Forums › Forums › Search & Filter Pro › ACF Checkbox not filtering
- This topic has 16 replies, 2 voices, and was last updated 5 years, 11 months ago by Anonymous.
-
Trevor(Private) November 22, 2018 at 2:44 pm #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(Private) November 22, 2018 at 6:56 pm #194313On 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(Private) November 23, 2018 at 2:11 pm #194363It 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, );
-
AuthorPosts