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



or otherwise querying for a taxonomy, lists both matching posts and pages. (My taxonomy applies to both posts and pages.) I would prefer that it listed only the posts. I don't think earlier version of wordpress worked this way.

Am I doing something wrong? Is there a proper way to get just the posts? I can think of hacks to fix it such as modifying the archive template or query hooks, but is there a simpler way? Can this behavior be changed in the way you register your taxonomy?

share|improve this question

I think you were trying to use


ie damien.co/tag/wordpress

You can try to use ?s= (search) and ?t= (tag) as URL parameters

share|improve this answer
Well, my question is not about the specific URL or query syntax that you use. It is just about the output. tag/tag_slug isn't a good example because tags only apply to posts and never to pages. But yes in your syntax tax/tax_slug is what I'm asking about. If the tax applies to posts and pages, is it always true that both will show up in this query? – sam Jul 13 '12 at 23:00
hi again - categories and tags by default are not assigned to pages. if they were added, then this is part of your theme customisation and the theme author would have decided to include page-tags (same applies to adding tags or categories to custom post formats). hope that helps? Damien – Damien Jul 13 '12 at 23:31

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.