$args = array(
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
‘category_name’ => ‘admitcard’,
‘posts_per_page’ => 5,
);
$arr_posts = new WP_Query( $args );
if ( $arr_posts->have_posts() ) :
while ( $arr_posts->have_posts() ) :
$arr_posts->the_post();
?>
endwhile;
endif;
$args = array(
‘post_type’ => ‘CUSTOM_POST_TYPE_NAME’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => 5,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘TAXONOMY_NAME’,
‘field’ => ‘slug’,
‘terms’ => array( ‘TERM_SLUG’ ),
‘operator’ => ‘IN’
),
),
);
$arr_posts = new WP_Query( $args );