Forums › Forums › Search & Filter Pro › Search word is considered as "empty" when I enabled Relevanssi at advance menu.
Tagged: relevanssi
- This topic has 4 replies, 2 voices, and was last updated 5 years, 2 months ago by Trevor.
Viewing 5 posts - 1 through 5 (of 5 total)
-
Trevor(Private) September 30, 2019 at 11:41 am #222314
That will be a function from your theme to see if a standard WordPress text search has been made, which indeed would be required to remove. Make sure you are using a child theme and name this file differently, and point our search to use this new file as the template.
Our plugin, if you want to make a similar check if a search has been made, would use code like this:
global $searchandfilter; $sf_current_query = $searchandfilter->get(85204)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your current results template code here }
Where the IF condition is set to display a different message if no search has been made (you can obviously change what it says, including adding HTML etc). Laos, change the ID number 85204 to whatever ID number our form is.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)