Answer the question
In order to leave comments, you need to log in
Duplicate url of product categories, how to remove?
There are two urls that open the same page
http://site.ru/product-category/stoly/obedennye_stoly/obedennye_derevyannye_stoly/
http://site.ru/product-category/obedennye_derevyannye_stoly/
Answer the question
In order to leave comments, you need to log in
You can do a 301 redirect with the template_redirect hook. It is only necessary to correctly describe getting the current term, then get_term_link() and wp_redirect().
In your case, it's better to take care of setting the canonical pages rel="canonical".
I was doing then url without a parent category, this is how it is implemented on many sites. For example Wildberries. It turns out that one page will be available from different sections.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question