how can i get posts from custom post type particular taxonomy category

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

Read More

How can i do this

Thanks in advance !

Related posts

Leave a Reply

1 comment

  1. 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(
            array(
                'taxonomy' => 'people',
                'field' => 'slug',
                'terms' => 'bob'
            )
        )
    );
    $query = new WP_Query( $args );
    

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