Forums › Forums › Search & Filter Pro › Hide posts if nothing found
- This topic has 30 replies, 3 voices, and was last updated 7 years, 2 months ago by
Ross.
-
Trevor(Private) March 29, 2018 at 6:31 pm #169025
Do you mean that if the user does not use the filters or search, then you want no results? You would need to edit your template file to add some logic in. Like this:
global $searchandfilter; $sf_current_query = $searchandfilter->get(1024)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your template archive code/loop here }
Change 1024 to the ID number of your form (from the form shortcode).
Anonymous(Private) March 30, 2018 at 11:51 am #169158Of course, please
https://www.dropbox.com/s/i50yx05068hg3p4/events.php?dl=0 -
AuthorPosts