Hi there,
I trying your WP_query method in a custom page template to display the filters for one of my custom post types. The query works fine (I get the list of posts) but as soon as I pass in the relevant Search Filter Pro ID, everything breaks (I the not working message I set below).
This is the code I’m using:
<?php
$args = array(
'post_type' => 'testi',
);
$args['search_filter_id'] = 2030;
$testimonials = new WP_Query( $args );
if( $testimonials->have_posts() ) :
?>
<ul>
<?php
while( $testimonials->have_posts() ) :
$testimonials->the_post();
?>
<li><?php the_title(); ?></li>
<?php
endwhile;
wp_reset_postdata();
?>
</ul>
<?php
else :
esc_html_e( 'Not working', 'text-domain' );
endif;
?>
Could you know what I’m doing wrong?
Thanks!