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

Would WP_Query('cat=1') display custom post types, or is that something that I have to specify?

I have a custom post type, am assigning it to a category, and would like for it to be displayed when that category is visited, but that doesn't seem to be happening.

Thank you for your help.

share|improve this question

You need to do:


Or if you want just your custom post to show, put the name of it instead of any. More info in Codex

share|improve this answer
If a custom post is under a category, will it show when that category is viewed? – mustafa.0x Feb 21 '13 at 16:18
you nwill need to add ?post_type=your custom post . Why not using taxonomies? – chifliiiii Feb 21 '13 at 20:20
I don't want to change the theme code; I just want all posts under a category to be displayed. This used to work in previous versions of WordPress. – mustafa.0x Feb 22 '13 at 5:46

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.