Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

MY product urls look something like this


The ring itself is in 3 categories, Human -> Jewellery (child of Human) -> Ring (child of Jewellery).

I want my product urls to always take the product category of the smallest child. In this particular case, it should look like


A hacky way of achieving this is to first update my product to have only the ring category. This will force my the product url to change. Following which, add whatever categories I want -- it won't affect the url anymore.

I really dont want to do this so I'm looking for a better (correct) way to achieve this. Thanks.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.