Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #269014

    Hi,

    In my footer I have placed my ‘product categories’ They link like this “www.3loptest.dk/products/office” etc.

    The problem is that the correct pages are without ‘products’ they are just: http://www.3loptest.dk/office

    How can I correct this so the ‘products’ will be removed from the links in the footer?
    Please see it here: http://www.3loptest.dk

    #269330

    But if you try to go to http://www.3loptest.dk/office you’ll be redirected to http://www.3loptest.dk/products/office/. Have you changed the Products permalink in Settings > Permalinks?

    Best regards,
    Josue

    #269424

    Hi,

    Yes, sorry. I have change the permalinks to be: ‘products’ instead of ‘portfolio’ as ‘products’ in our business term are more correct than ‘portfolio’.

    For our 6 different business categories (portfolio items) I have also set a custom link and they are:

    3loptest.dk/office-products
    3loptest.dk/shopfitting
    3loptest.dk/graphic

    and so on. This is so it looks better when we write the URL on our offline brochures.for each business categories. Looks better to write this than the longer: ‘3loptest.dk/products/shopfitting’

    So in the footer I would like to also avoid using the ‘products’ as the user comes to a wrong page.
    In settings->permalink – can something be pasted in so it will leave it empty/skip the ‘products’ in the URL?

    #269544

    That’s not possible out of the box, try this plugin:
    http://wordpress.org/plugins/custom-permalinks/

    If that doesn’t work, try adding this at the end of the theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery("#footer .newsbox#portfoliobox-4 a").each(function(){
    var $this = jQuery(this), theURL = $this.attr("href");
    $this.attr("href", theURL.replace("products/", ""));
    });    
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Cheers!
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.