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.

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.

Thanks

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

 
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.