I have used below query:
$args = array(
'post_type' => 'blogs',
'tax_query' => array(
array(
'taxonomy' => 'blog',
'field' => 'term_id',
'terms' => $backendEngineering->term_id
)
)
);
$responseData = new WP_Query( $args );
echo '<br/>';
print_r($responseData);
echo '<br/>';
It's working fine. But My requirement is to fetch only post name and post ID.
Is this possible? If it is then how can we do it?