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.

Basically, I'd like to create a category permalink like example.com/books/adventure without having to make adventure a child-category because it will apply to other categories as well.

So the end result is:

example.com/books/adventure

example.com/movies/adventure

example.com/toys/adventure

The order is based on the two parent categories, with "items" going first, and "genre" going second.

And you could also search the categories separately to see all of the books, or all of the adventure items.

How can I do this?

Thanks!

share|improve this question
    
I am not sure about your specifics. Basically you want child category but without it being child category? The point being? –  Rarst Dec 30 '10 at 6:31

3 Answers 3

up vote 3 down vote accepted

David, welcome to wordpress answers. The answer is: Switch to some other platform. Wordpress can not with what's currently in core produce such a result easily.

Technically spoken it's possible, but folks hate me here to say how (well Apache + PHP) in concrete, so I don't tell it because I fear the negative karma this give on this site.

Just switch to something else if you seriously want to do such stuff and more. Like symfony2 with a database layer. After about one to three month as a single developer you can achieve much more then you can imagine with wordpress.

And the best thing is: You can even add a wordpress blog later on. ;)

share|improve this answer
    
Thanks for the honest analysis. In the end, we discovered that you are technically right, but we did find a way that seems to be working. More testing is needed before we can call it a solution though. –  David Jan 14 '11 at 3:36
    
I would recommend using an actual CMS for this like ExpressionEngine. I would say Drupal, but Drupal is a horribly complex CMS far more complex than most users could ever fathom. –  DigitalSea Jan 14 '11 at 5:41

It is not possible. And if it were, I wouldn’t recommend it, because WP cannot handle categories in permalinks well.

But there is a solution: Use custom post types. Books and movies require a lot of different meta data. You may want ISBN, editor, publisher, number of pages etc. for books and actors, director, screen format for movies. CPTs are made for this; the codex has an example for books.

Both post types may share a custom taxonomy. Justin Tadlock has written a very nice tutorial about this feature, and he has made a website with books and movies and where you can see how the result may look. As an example: You can browse the genre adventure at popcritics.com/genres/adventure.

That’s not exactly what you asked for, but it is a solution you probably like more than your initial request, once you’ve got used to it. ;)

share|improve this answer
    
Awesome. This actually helped us get to the answer. –  David Jan 14 '11 at 3:31
    
You’re welcome. A good opportunity to improve your accept rate. ;) –  toscho Jan 14 '11 at 5:13

There is a plugin to pull custom fields into the permalink, though the problem is if certain content does not have custom fields, then you end up with 2 forward slashes in the url.

http://tec.toi-planning.net/wp/custom-fields-permalink

share|improve this answer
    
Great point. This is helpful. –  David Jan 14 '11 at 3:31

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.