Forums Forums Search & Filter Pro ACF Checkbox not filtering

Tagged: ,

Viewing 7 posts - 11 through 17 (of 17 total)
  • Anonymous
    #194197

    Sure, it is just a test enviroment.

    Thanks.

    Trevor
    #194201
    This reply has been marked as private.
    Anonymous
    #194245
    This reply has been marked as private.
    Trevor
    #194284

    Let’s try to nail this down a bit further then.

    On your form/search page, the ACF field does not work, but do the other fields?

    On my form/search page (when the slider is removed), the form works?

    If both above are true, the main difference between the two forms is the Display Results method (yours is Post Type Archive), which would suggest something in the template code for your archive page is the issue. This is most likely to be something affecting the wp_query, so most likely there are arguments being added or removed from the arguments array (typically named $args) which is being passed to the wp_query function. IF this turns out to be the case, we can add our arguments to the array. But this would require you to do a bit of digging in to the code of the template in use for that page.

    Anonymous
    #194313

    On your form/search page, the ACF field does not work, but do the other fields?
    No, the other fields also do not work.

    On my form/search page (when the slider is removed), the form works?
    Yes, your form works perfect, with and without the slider.

    The template where S&F is added is called taxonomy-download_category.php. The wp query is

    $temp = $wp_query; $wp_query = null;
    $wp_query = new WP_Query(); $wp_query->query($args); while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <?php get_template_part(‘includes/loop-shop-listings’); ?>

    This query is also in a template called archive-download.php. Do we need to add a argument to these templates?

    Trevor
    #194363

    It is this we need to affect:

    $wp_query->query($args);

    Somewhere in the code (that processes before that line) that $args list is being populated, and it can be changed like this:

    $args = array(
    	'post_type'  => 'my_custom_post_type',
    	'search_filter_id' => 123,
    );
    Anonymous
    #194385

    Yes it is working 🙂

    Thank you so much for the great support Trevor.

Viewing 7 posts - 11 through 17 (of 17 total)