0

I'll try to make this as clear as possible.

I'm am trying to figure out a few things to clean up the permalinks on a large website project. We're using custom post types and ~200+ custom categories (we chose this because you can really add a lot of custom field spaces and data easily with the new custom post types).

We need our permalinks to look like this:

example.com/books/adventure/post-name

where "books" and "adventure" are both categories, but we would prefer "books" came first.

We would create adventure as a sub-category of books, but we use this same category for
adventure movies, adventure games, etc.

So a large site with books, movies, games, etc. where a person first chooses one of those categories and then drills down deeper to adventure, romance, kids, etc.

Right now, we have:

example.com/main-category/books

example.com/sub-category/adventure

example.com/product/post-name

Basically I need to:

  1. Remove the slugs from the custom type categories (i.e. main-category & sub-category)

  2. Make the "sub-category" appear after the "main-category" for the permalinks for sub-category pages.

  3. Create a new dynamic base category for the custom posts, which reflects the categories it's in (/books/adventures/post-name).

  4. Do this as simply and clean as possible, without a lot of plugins or things that may cause trouble down the line.

OR...if you have a much better way to do this, I'm open to any suggestions.

I know that we can use a Wordpress Network install instead of main-categories, but with 50-100+ of them, that is not feasible for us.

2
  • 1
    Both books and adventure are terms in the same taxonomy? How do you know which one should come first? It seems Jay Neely and Henk Jan are trying to solve a similar problem by creating two different taxonomies and combining them in the URL. If you can use post_name as the unique identifier, I think we can solve this.
    – Jan Fabry
    Commented Dec 29, 2010 at 10:02
  • Thanks for the quick response! I think we're looking at just using the regular categories with the custom post types. It seems much easier to modify the resulting permalink and will achieve the same goal. We have two other questions along those lines, but will just post another question so others can benefit as well.
    – dfcode3
    Commented Dec 29, 2010 at 21:32

1 Answer 1

0

There is no such thing as a "dual category permalink" in wordpress, so you might be looking for custom rewrite rules (Wordpress.org Forums) and let deal your own code with the URL design as you need it then.

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.