I am trying to build a WP_Query and I want to fetch only the posts where the taxonomy (custom post type category with the name ‘give_forms_category’) is 18

I have a working one for normal post type but I need it for a custom post type:

$the_query = new WP_Query( array ( ‘posts_per_page’ => $atts[‘posts’], ‘post_type’ => array( ‘give_forms’ ), array( ‘cat’ => 18 ) )

Can someone give me a hint?

Read more here: How to get category ID 18 from custom post type as a condition in WP Query


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: