Take the 2-minute tour ×

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
add comment

1 Answer

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
add comment

Your Answer


