adding tax_query to $query_string
the best way of doing this is WP_Query $query = new WP_Query( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘my_custom_tag’, ‘slug’ => ‘slug’, ‘terms’ => array( ‘my_tag_slug’ ), ‘operator’ => ‘in’, ), ) ); and you should do the ajax callback like this add_action( ‘wp_ajax_my_action’, ‘my_action’ ); function my_action(){ //my custom code … … Read more