The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
To be honest I am not sure how to create that function – it’s a bit beyond my abilities.
I tried this, but it made the search form stop working.
function filter_function_name( $query_args, $sfid ) {
//if search form ID = 225, the do something with this query
if($sfid==26869)
{
//modify $query_args here before returning it
$query_args[‘post_type’] = array( ‘practitioners’ );
}
return $query_args;
}
add_filter( ‘sf_edit_query_args’, ‘filter_function_name’, 20, 2 );
Just to simply matters, I have removed all the functions.php code altogether for the time being. As you will see on the page, the pagination does not seem to work with the search form on the page. When I put in a manual pagination link of https://staging-universallifetools.kinsta.cloud/our-teachers/page/2 it works, but the actual pagination buttons do not seem to do anything, just refresh the page.
I have just taken this code out and it still does not work. If I take the shortcode for the search and filter pro searh out, then the pagination works again, so I am not sure what is happening. Happy to share login details if that would help as it is only a staging site
Hi Trevor – I am using the below code. Happy to catchup via Skype but I am in Australia GMT +10 so not sure what time zone you are in?
add_filter(“pre_get_posts”, “modify_bb_query”);
function modify_bb_query($query){
if(!isset($query->query_vars[‘fl_builder_loop’])){
return $query;
}
//if is page “our-teachers” and this is a fl_builder_loop
if((is_page(“our-teachers”)) && ($query->query_vars[‘fl_builder_loop’] == true)){
//then attach S&F to the query
$query->set(‘search_filter_id’, 26869);
$taxquery = array(
array(
‘taxonomy’ => ‘teacher_status’,
‘field’ => ‘slug’,
‘terms’ => array( ‘teacher’ ),
)
);
$query->set( ‘tax_query’, $taxquery );
}
}
Hi Trevor
I have been working with Justin Busa on the Beaver Builder end with regards to this issue who has confirmed that it is not a problem specific to Beaver Themer.
Even with Beaver Themer deactivated, when SFP is active, CPT archives aren’t returning any posts and the $post object is NULL – please see the attached screenshot.
https://www.dropbox.com/s/flr7ipew95rsiyt/Screenshot%202018-01-15%2010.01.47.png?dl=0
It’s definitely an issue with the Search & Filter Pro plugin. Can you please have a look at this urgently?
Thanks in advance!
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy