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.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.