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

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?

share|improve this question
possible duplicate of Custom Post Types on Category Pages – Chip Bennett Sep 16 '11 at 12:40

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

share|improve this answer
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 Sep 16 '11 at 13:10
don't forget about paging in wp_query – Maciej Kuś Sep 16 '11 at 13:13
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 – Maciej Kuś Sep 16 '11 at 13:24

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.