0

I have been wondering what would be the best way to redirect taxonomy terms to pages in Wordpress.

For instance - let us assume we have a taxonomy called 'product type' for a CPT called 'products' and the taxonomy term is 'computers'. The URL of the term's page would now be mydomain.com/product-type/computers.

In order to improve usability and navigational ease, however, we would like to send users to a page called mydomain.com/computers when they click onto 'computers' somewhere on our website.

A simple listing of the products that are part of the taxonomy term 'computers' as such is not necessary in our case.

I am aware that this could be done using 301 redirects OR possibly by using the method described here: Best Way to Redirect Category to Page and Hide Category

Unfortunately the latter thread has not been discussed too intensively.

In our case we are dealing with a rather big website and there will be roughly 1000 - 1500 product types on our websites and we would have to redirect all of them.

So I am interested in finding out not any solution to this problem, because I am aware that a solution that might work perfectly fine on a small scale might fail on a larger scale for instance due to performance issues.

Thanks in advance!

2
  • Could this right here be the possible solution: productforums.google.com/forum/#!topic/webmasters/QnCPxnCq3sM
    – Florian
    Commented Jan 27, 2017 at 10:42
  • I understand that you want a specific URL structure but having product-type is a good for seo and helps users understand where they are in the heirachy of products. Having the URL structure you are seeking co city could also limit/clash with other URLs
    – Pete
    Commented Jan 27, 2017 at 14:25

1 Answer 1

1

You basically need to change the permalinks to remove the custom post type slug from your URLs and then add your post type to the main query.

This post should be what you need: Remove slug from custom post type post URLs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.