0

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

1

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".

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.