Forums › Forums › Search & Filter Pro › How te remove initial results when using results shortcode
- This topic has 5 replies, 3 voices, and was last updated 7 years, 3 months ago by
Anonymous.
Viewing 6 posts - 1 through 6 (of 6 total)
-
Trevor(Private) May 8, 2018 at 11:57 am #176320
This would depend on the layout template being used for your page. That would depend on your theme or page builder/content plugin that you are using, or, if you are using our shortcode display results method and our results.php template file, it would look 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 OR results.php code here }Change 1024 to the ID number of your form (from the form shortcode).
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)