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.

Is there any way (plugin or function), to include the sub-category and the category automatically in the permalink structure?

I want an URL structure like this:


share|improve this question
add comment

2 Answers

set the permalink as


When you set a category parent of child, the permalink will be


I tried and worked fine!


share|improve this answer
add comment

Thanks for sharing this. It's working for me! But for this you need to assign only "sub-category" to the post. Means, I have a post under "parent category > sub-category1", so, I will assign "sub-category1" to the post and not the "parent category" and "sub-category1".

share|improve this answer
add comment

Your Answer


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

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