AnonymousInactive
I know Avada seems to present some troubles with Search & Filter Pro, and I’ve tried piecing together a consensus or how-to, but I can’t quite seem to put the pieces together.
Here’s what I’m attempting to do:
We’ve got our posts categorized as A, B, C, D, E, and F.
I would like to create a page–we’ll call it Encouragement–that has a S&F form for categories A, B, and C only, with S&F using Ajax and the results displaying in the Large Blog layout format.
I would like to create another page–we’ll call it Resources–that has a S&F form for categories D, E, and F only, with S&F using Ajax and the results displaying in the Large Blog layout as well.
That’s it. I’m not sure how to set that up and if it can even be done. The results don’t even have to display in the Large Blog format. It can really be any of the formats, as long as it’s styled well.
AnonymousInactive
Trevor I manage a college website… I’m currently using a plugin called Ultimate WP Query Search Filter which has been discontinued. I bought yours to try and get it to work with my classes like you have done with your movies.
Here’s my current search page for courses:
https://www.rappahannock.edu/schedule/
I would be thrilled to pieces if I could get my classes to appear as results (on the same page) like you have done with the movies. I really only would need “genres” and “Film Certificate” as options. Genres could be the different types of classes, campuses, etc. Certificate would be the semester.
I saw where you responded to the other person in April who asked how to set up a “Movies” style search, and you responded by giving them some links to your site with very elementary steps, which I looked at and had already read.
My courses are all posts, and they are filterd by tag.
I know this can be done but I don’t know how to get there. Can you help?
AnonymousInactive
Following up on the FAQ item “How do I remove CSS/JS files when I don’t need them?”, if I only need search and filter pro on a single page, I can pretty easily remove scripts and styles. What’s the proper way of adding search-filter-plugin-build
back to the template where I need it?
Thanks!
I would suggest that you start really simple and build upwards.
You need to make a form first, so start here:
https://www.designsandcode.com/documentation/search-filter-pro/getting-started/
I would suggest you start by making it using the Shortcode Display result method:
https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
It won’t look so good, but you can test out ideas more easily with this method, and then when the form works as you want, you might change the Results Display method to one that better suits your style needs.
AnonymousInactive
Trevor, thanks again for spending time with me today. I really appreciated it.
Good news, I finally figured it out!
Here’s the happy code:
<?php
global $searchandfilter;
$args = array(
"str" => '%2$s',
"delim" => array(", ", " - "),
"field_delim" => ', ',
"show_all_if_empty" => false
);
$sf_current_query = $searchandfilter->get(99801)->current_query()->get_array();
$sf_current_style_query = $searchandfilter->get(99801)->current_query()->get_fields_html(array("_sft_style", "_sft_name"),$args);
$sf_current_cuisine_query = $searchandfilter->get(99801)->current_query()->get_fields_html(array("_sft_cuisine", "_sft_name"),$args);
echo '<strong>Filters</strong>';
if ( empty($sf_current_query ) ) {
echo ' • ' . "All" . "<br /><br />";
} else {
echo ' • ' . $sf_current_query['_sft_category']['active_terms'][0]['name'] . ' • ' . $sf_current_query['_sfm_wpcf-location-city']['active_terms'][0]['name'] . ' • ' . $sf_current_style_query . ' • ' . $sf_current_cuisine_query;
echo "<br /><br />";
}
?>
Cheers!
Hi there
I figured the solution.
Your theme has this function _st_list_categories_without_title
, which, it seems to (unintentionally perhaps) filter every single wp_list_categories
I don’t understand the logic of the function, but they seem to destroy and recreate the taxonomy list for perhaps a particular style of formatting.
Anyway, we use that function in our plugin, and it caused some errors because we use the walker
argument with wp_list_categories
.
I managed to figure a workaround though, which is to remove the walker setting from your themes _st_list_categories_without_title
function.
You can override their function (and use my modification) by adding this to your child theme-
function _st_list_categories_without_title( $output, $args ) {
$defaults = array(
'echo' => 0,
'use_desc_for_title' => 0,
);
$r = wp_parse_args( $args, $defaults );
$r['use_desc_for_title'] = 0;
$r['echo'] = 0;
$r['walker'] = ''; //this is the only change I made
remove_filter( 'wp_list_categories', __FUNCTION__, 11 );
$output = wp_list_categories( $r );
add_filter( 'wp_list_categories', '_st_list_categories_without_title', 11, 2 );
return $output;
}
I’m not sure if it will have unintended consequences in your theme though (and I’m sure this filter needs to be applied conditionally rather than globally), so it would be best to direct your theme author to this post – I would be happy to discuss with them this code and my suggestion.
Thanks
Hi there
I figured the solution.
Your theme has this function _st_list_categories_without_title
, which, it seems to (unintentionally perhaps) filter every single wp_list_categories
I don’t understand the logic of the function, but they seem to destroy and recreate the taxonomy list for perhaps a particular style of formatting.
Anyway, we use that function in our plugin, and it caused some errors because we use the walker
argument with wp_list_categories
.
I managed to figure a workaround though, which is to remove the walker setting from your themes _st_list_categories_without_title
function.
You can override their function (and use my modification) by adding this to your child theme-
function _st_list_categories_without_title( $output, $args ) {
$defaults = array(
'echo' => 0,
'use_desc_for_title' => 0,
);
$r = wp_parse_args( $args, $defaults );
$r['use_desc_for_title'] = 0;
$r['echo'] = 0;
$r['walker'] = ''; //this is the only change I made
remove_filter( 'wp_list_categories', __FUNCTION__, 11 );
$output = wp_list_categories( $r );
add_filter( 'wp_list_categories', '_st_list_categories_without_title', 11, 2 );
return $output;
}
I’m not sure if it will have unintended consequences in your theme though (and I’m sure this filter needs to be applied conditionally rather than globally), so it would be best to direct your theme author to this post – I would be happy to discuss with them this code and my suggestion.
Thanks
AnonymousInactive
OK, using a theme that old without support is a major security risk. If the theme has a security hole, a hacker will find your site very easily.
That’s a very big problem. It’s quite difficult to tell clients they had to re-insert all the data and I have to create a new website. The last update of the theme is june 2017, the theme owner does not tell when the site will be not avaible. It’s not easy, I’m trying to use less theme feature, but if I have to rewrite the code for everything websites become too much expensive for my kind of clients.
Using your theme, are you able to make a page with the content you want, styled as you want, ignoring Search & Filter for one moment)?
Yes, Sure!
OK, using a theme that old without support is a major security risk. If the theme has a security hole, a hacker will find your site very easily.
Using your theme, are you able to make a page with the content you want, styled as you want, ignoring Search & Filter for one moment)?
AnonymousInactive
Dear Designs & Code Team:
I purchased your plugin Search & Filter pro plugin long time ago. Part of it is working correctly but there’s something wrong with custom field search.
We sell paintings on our site and we want customers to filter by style, technique and artist. These filters are working correctly. However, we also want customer to filter by price and by size. The paintings are wordpress posts which have custom fields for prices and sizes.
Prices are set under the “sellprice” custom field. We configure the Search form and the field appears correctly on the frontend. However, when you click the submit button the price filter does not work. The same problem happens with the painting width (artwidth) and height (artheight).
I can send you screenshot and give you access to the site if you need it.
Look forward to hearing from you soon.
Kind regards,
Inigo