Forums › Forums › Search & Filter Pro › How to not show all results
- This topic has 5 replies, 2 voices, and was last updated 10 years, 6 months ago by Ross.
-
Ross Moderator(Private) May 20, 2014 at 10:35 pm #778
Hey Amin,
What do you mean exactly, so it displays custom content/message before searching begins?
Thanks
Ross Moderator(Private) May 21, 2014 at 2:10 pm #795Ok this is one I’ve given some thought to…
Basically.. if a user is using the search form, and then deselects/resets everything – they will expect all the results to be shown – because they haven’t filtered the results by any criteria…
So changing this in the search form is not recommended.
I think what you are looking for is a kind of landing page for search – the first time you go on the search page, you will have a custom message with the search form, then the user interacts with the search form and the results begin loading.
In this case I would recommend the following steps:
- Create a new
Page
where users will begin all their searches. - Make sure this page uses the exact same template as the search results – if you cannot select the page template from the drop down list follow these steps:
- In your theme folder, duplicate your template and name it something else (by default this is
search.php
so duplicatesearch.php
and call itsearch-landing.php
. - Edit
search-landing.php
and add this to the top of the file (as per WP Codex here):<?php /* Template Name: My Custom Search Landing Page */ ?>
- Now go back to your page, and you should be able to select a page template called “my custom search landing page” – select this.
- This will be your landing page – you can modify this template as needed…! You can then perform a search from this page and user will be redirected to the proper search page which will display all (unfiltered) results if desired.
- In your theme folder, duplicate your template and name it something else (by default this is
Let me know how you get on! 🙂
Ross Moderator(Private) May 22, 2014 at 11:28 am #812Hey Amin there’s not unfortunately – but something I’m working on adding in an update soon (hopefully the next couple of days) 🙂
Let me know how you get on with the rest.
Thanks
- Create a new
-
AuthorPosts