2

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"?

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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