WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So basically I have a WordPress page called games. Within this page I have a list of custom post type posts. Using a form and some $_GET magic, the user is able to filter the posts based on tags, as well as, first letter in the title.

The base url for the page is: localhost/gamesite/games/

The URL for the filter looks like this: localhost/gamesite/games/?genre=audio-and-video&platform=ps3&alpha=A

The desired URL structure should look like this: localhost/gamesite/games/audio-and-video/ps3/?alpha=A

I'm looking to use the native WordPress API to set these rules, instead of hacking the htaccess file. After reading several posts, I am unable to create any working form of the desired URL structure. More importantly than having the end code, I would like to learn how this process works. Any help would be greatly appreciated.

share|improve this question
I would try to make it work with mod_rewrite rules in .htaccess. Is that an option? – Wietse Venema Mar 5 '11 at 20:16

Here's a nice explanation of how rewriting is done in WP:


Also, might want to take a look at similar questions:

Writing Custom Rewrite Rules that Incorporate Category for Custom Post Types?

share|improve this answer

Your Answer


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.