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

I have a custom post type archive template archive-my-posttype.php with pagination.

These post types have a custom taxonomy called theme.

I am displaying these themes(terms) in the sidebar as a checkbox list.

How can I filter the custom post type based on the selected themes/checkboxes?

Can this be accomplished by adding a query_var parameter (theme_filter) and somehow modifing wp_query with the pre_get_posts filter?

I am trying to let WP handle pagination rather than have to rewrite it myself.


share|improve this question
up vote 1 down vote accepted

I believe that what you are describing is how WordPress works out of the box. You will just need to create custom links in your sidebar. Something like example.com/?post_type=your-custom-post-type-slug&theme=taco should query for "all custom posts about the theme named taco".

share|improve this answer
Ok I understand that much. Originally I wanted to let users to filter the post type by multiple taxonomies, but creating a list as you suggest makes sense. Thanks – Bundarr May 20 '11 at 15:47

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.