in my custom post type i've set 'taxonomies' => array('category'). However, within my category.php page, none of the custom post types are being displayed, only posts.

How do i make ALL post types appear, not just the post?


1 Answer 1


just guessing.. did you set "public"=>"true" in register_post_type(..)

  • Yep, public is set to true. According to print_r($wp_query), it tells me that it's only querying the posts table. I solved this by putting this at the top of my loop $cats = new WP_Query(array('post_type'=>'any','category_name'=>single_cat_title('', false)));
    – dotty
    Commented Sep 16, 2011 at 13:10
  • don't forget about paging in wp_query Commented Sep 16, 2011 at 13:13
  • 1
    here is better solution using pre_get_posts filter: wordpress.stackexchange.com/questions/18497/… - read all comments and change is_home() to is_category() in this custom filter function Commented Sep 16, 2011 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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