Forums › Forums › Search & Filter Pro › Showing search results
- This topic has 11 replies, 2 voices, and was last updated 7 years, 1 month ago by
Trevor.
-
Trevor(Private) August 14, 2018 at 11:19 am #185435
The text that starts:
Architecten, interieurdesigners, vormgevers …
What about the title? and the breadcrumbs?
And you want to stay on that page? This means the display of the text needs to be conditional, and that means that you would need to output the text conditionally using PHP (the PHP needs to detect if a search has been made). The safest way to do this is to create the PHP as a shortcode and place the shortcode in to a Visual Composer (Page Builder) Text element.
This plugin allows you to create a shortcode with PHP in it:
https://wordpress.org/plugins/php-code-widget/
The PHP would look something like:
global $searchandfilter; $sf_current_query = $searchandfilter->get(187)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your page title, breadcrumbs, text here }
That is the theory of it.
Anonymous(Private) August 14, 2018 at 11:36 am #185441The text, title en breadcrums can stay on the page but you should automatically scroll down to the results. Now you enter a selection and you go to the top of the page and you have to scroll down to see the results.
Can you scroll down automatically to the results, is this possible?
Thanks!!
PetraAnonymous(Private) August 14, 2018 at 12:41 pm #185460https://verometal.online-meekijken.nl/nl/search-and-filter/
the link to the image ๐
-
AuthorPosts