We’ve seen plugins to do this, and a lot of people with different code modifications. We really would like to achieve this the cleanest and simplest way possible, without worrying about out-dated plugins or causing problems with too many mods.
Leave a Reply
You must be logged in to post a comment.
Not sure how clean or easy this is, but it seems to work. This code pretty much does the job for this question and another one about removing the parent category from the permalinks. Got it from a plugin that does this, and decided to just use the raw code.
So the permalinks only have the lowest child-category listed.
First, we had:
example.com/category/items/books/
and now…
example.com/books
The RSS feeds, however, don’t seem to work with this shorter url, and still require the long-form url. (Not sure if there’s a fix for that.) Paste the code below into your functions.php file. I’m using WordPress 3.0+.