WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just for curiosity, is it possible to have a different permalink scheme for different templates or categories?

For example, for post "XYZ leach review" in category pets/dogs to have "mysite.com/reviews/pets/dogs/xyz_leach_review.php" and then any post in another category to be "mysite.com/justthecastegory/the_post_name.php"?

share|improve this question

By Design, there is one permalink structure for the whole wordpress site. What you try to achieve needs to introduce a custom permalink structure for a part of it.

This is not trivial because you need to introduce your own permalinks via rewrites (Rewrite API (Wordpress Codex)) and you need to change the links to those pages when linked on occasion. This can be done with hooks for the appropriate functions. E.g. for get_category_link() you can make use of the category_link filter.

I haven't done this yet for a larger part of a site and I assume that it can introduce problems as you need to take care of multiple places to have it working properly. I don't want to say it's not possible but just a reminder of the side-effects this can have.

share|improve this answer

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.