-
AuthorPosts
-
May 23, 2014 at 8:34 am #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.dkMay 23, 2014 at 11:36 pm #269330But 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,
JosueMay 24, 2014 at 5:17 am #269424Hi,
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/graphicand 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?May 24, 2014 at 9:51 pm #269544That’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 -
AuthorPosts
- You must be logged in to reply to this topic.
