#StackBounty: #custom-taxonomy #permalinks #urls Change URL structure of subcategory archive pages

Bounty: 100

I have my permalink structure for posts set up like this: /%category%/%postname%/

This generates URLs like this: mysite.io/category/sub-category/post-name

Thats all fine.
However, the archive page URLs for subcategories are like this: mysite.io/sub-category

Instead, the URLs for subcategories should be like this: mysite.io/category/sub-category

I don’t think this is possible using the permalink settings in the admin dashboard but perhaps there is something I could add to the functions.php?

I have found this page in WordPress codex and think it might be useful for finding a solution but my WordPress knowledge seems way too limited to understand how:

‘hierarchical’ – true or false allow hierarchical urls (implemented
in Version 3.1) – defaults to false

Function Reference/register taxonomy

Thanks in advance


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.