Use wordpress tax query inside wp_query
$args = array(
'post_type'=>'custom post';
'posts_per_page'=> -1 ,
'order' => 'ASC'
'orderby' => 'ID'
'tax_query' => array(
array(
'taxonomy' => 'private',
'field' => 'slug',
'terms' => 'bob',
),
),
);
$query = new WP_Query( $args );
and replace 'terms' => 'bob',with 'terms' => '<your category slug>',. Slug can be checked from the back-end
source
share