Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am looking for a way to change the permalink structure based on the category a post is in. If the post is in the "blog" category I would like the permalink to be /blog/%postname%/ and if it is any other category just /%postname%/. There used to be a plugin called Advanced Permalinks that could do all of this for you but it is no longer supported. I have researched the topic and can't seem to find a good way to code this myself or any plugins that get the job done.

Any help or suggestions would be appreciated.

share|improve this question
A simple solution would be to just set your permalink settings to the "Post name" option, under Dashboard -> Settings -> Permalinks. Then, register a custom post type for your "Blog". Set the rewrite slug to "blog". Then every post you make in your "Blog" custom post type would output a URL like: and every post you make under the default post type, would output a URL like: – Michael Ecklund Dec 10 '13 at 17:14
Thanks, I didn't think of that. This would be a great idea if I were starting a site from scratch. The part that makes my situation sticky is that the site already has a few hundred posts, so changing the permalink based on their current category would be ideal. – tyler Dec 10 '13 at 20:08

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.