Forums › Forums › Search & Filter Pro › General search function not working
Tagged: general search
- This topic has 13 replies, 2 voices, and was last updated 7 years, 8 months ago by
Anonymous.
-
Trevor(Private) January 31, 2018 at 4:11 pm #156416
Hi
I didn’t get an earlier reply, so something must have gone wrong with that, sorry.
I see that you use WP Engine, which gives me an idea.
There is a setting to override a feature of WP Engine hosting, that truncates long SQL queries (which ours are). Edit the site wp-config.php file and add this at the top, after line 1 (on a new line 2):
define('WPE_GOVERNOR', false);(also see here for another related support note about this – https://support.searchandfilter.com/forums/topic/killed-query-errors-in-log/#post-64826)
I would just say though, that rather than adding this in blindly, to research and make sure this setting doesn’t adversely affect anything in your site.
Trevor(Private) January 31, 2018 at 4:16 pm #156419Looking at your setup:
https://screenshots.firefox.com/oQyiv1YCCZ4aLS4S/smartthinking.staging.wpengine.com
These two settings are to be used only if Relevanssi plugin is installed, and I do not see it, so that is more likely the cause. Either install Relevanssi and refer to our documentation here:
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/
OR uncheck those two options.
Anonymous(Private) February 3, 2018 at 1:49 pm #157113Hi Trevor,
Thanks so much, it appears that Relevanssi was indeed causing the problem. The search works now I have unchecked those options.
Thank you!
I’m not sure whether this is beyond your support service, but I am also trying to hide and show the filter options using Jquery toggle class on click of ‘advanced search’.
This works fine, except for the fact that once the item is selected from the dropdown menu, the fields hide again. I would like them to stay visible until the ‘advanced search’ button is clicked again.
I realise this might be a jquery question rather than a plugin one, but I wonder whether the classes change when the filter options are selected? Or if there is way you normally recommend to do this?
Thanks so much,
Alex
Anonymous(Private) February 5, 2018 at 11:21 am #157341Dear Trevor,
I have a separate question that I hope you might be able to help with:
When I search for a keyword, I get ‘Search results for: $keyword’
However when I use the filter drop downs, the search results page does not display what was searched for.How can I add this functionality?
Thanks for your help,
AlexTrevor(Private) February 5, 2018 at 11:26 am #157347In the current version of our plugin, it will some coding on your part. Our documentation is here:
https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/
We plan to make this much easier in the next major version (V3).
Anonymous(Private) February 5, 2018 at 12:11 pm #157375Hi Trevor,
Thanks for the quick response.
I can get it to half work… This search query should yield the response:
“Search Results for: green Brexit, Legatum Institute, Posts”
http://smartthinking.staging.wpengine.com/?sfid=979&_sf_s=green&_sft_category=brexit&_sfm_think_tank=Legatum%20Institute&post_types=post#aAt least that is what I would like it to do. But currently only the category is showing.
This is the markup:
<?php global $searchandfilter; $sf_current_query = $searchandfilter->get(979)->current_query(); ?> <h1 class="archive_title"><span><?php _e("Search Results for","wpbootstrap"); ?>:</span> <?php echo esc_attr(get_search_query()); ?> <?php $args = array( "str" => '%2$s', "delim" => array(", ", " - "), "field_delim" => ', ', "show_all_if_empty" => false ); echo $sf_current_query->get_fields_html( array("_sft_category", "_sft_post_tag", "_sft_sfdc_post_type", "_sft_sfdc_think_tank"), $args ); ?> </h1>Have I done something wrong?
Thanks,
Alex -
AuthorPosts