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

I have registered custom post type Article in my template using register_post_type function. and i also having taxonomy category for this article posts.

Here i want to filter the posts under particular category. using query post

How can i do this

Thanks in advance !

share|improve this question
up vote 3 down vote accepted

If you read http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters in detail it outlines everything you need. Take a look at the following code sample taken from the codex. It should help you :)

$args = array(
    'post_type' => 'Article', /* This is where you should put your Post Type */
    'tax_query' => array(
            'taxonomy' => 'people',
            'field' => 'slug',
            'terms' => 'bob'
$query = new WP_Query( $args );

Please note that this query does NOT account for paginated data.

share|improve this answer
Thanks that works really great ! – Gowri Jul 18 '11 at 13:04

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.