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.

Is it possible to create a permalink structure like this:

mysite.com/category/books/tag/read/2010/01

Or at least something like this:

mysite.com/category/books/?tag=read&year=2010&month=01

To elevate this question even further, would it be possible to do it for custom post types and taxonomies as well? Something like this:

mysite.com/movies/actor/john-cusack/genre/thriller/2010/01
share|improve this question

1 Answer 1

Yes, it's possible. Use custom query variables, declare rewrite rules to organize permalinks.

For example, one can rewrite this URI:

/movies/bruce-willis/2011

to this one:

/index.php?post-type=movies&actor_tax=bruce-willis&requested_year=2011

(using WP_Rewrite)

You need to "declare" your own "query variables" and use them in your own archive template.

share|improve this answer
    
Well, yes, I know that I should do something like that. But right now I am stuck at how should I mix and match custom post types with custom taxonomies. Ie, I can view custom post type yearly archive like this: /movies/?year=2010 and I can view custom taxonomy yearly archive like this /actor/bruce-willis/?year=2010 - but is there a built-in way to mix those two together (remember - "actor" is a taxonomy that may be used for other post types as well). Something like /movies/actor/bruce-willis/?year=2010? –  ragulka Jul 12 '12 at 10:40
    
No, there is no built-in way to mix those things. I've updated my answer a bit. –  brownian Jul 12 '12 at 14:04

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.