Forums › Forums › Search & Filter Pro › show search text and offer new search
- This topic has 5 replies, 2 voices, and was last updated 8 years, 2 months ago by
Trevor.
-
Anonymous(Private) January 25, 2018 at 7:39 pm #154998
Hi there,
I am very happy with this amazing plugin and wanted to ask about 2 features I am not sure are currently possible:1. my client asked if it would be possible to show what the person was searching on top of the search results. sometimes people search for a while and they forget what they put in. is it possible to show what was searched for?
2. they also asked if it were possible to have a button to go back to the “clean” search form.
If there is a way to do this, even with a bit of php, I would appreciate your guidance and help!
thanks a lot!
niliTrevor(Private) January 26, 2018 at 2:16 pm #155161You can access the search query and use this to display the current search. Does the results page have the search form on it (which would help)? That would then also be able to have the reset button. But ‘back’ to the originating page with a clear search I am not sure about. Back buttons work very oddly on browsers. As our plugin does not track your breadcrumbs, it would not know where to go back to.
The documentation (and search for the actual filter name on the forum and you will find many sample snippets):
https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/
Remember, if you are using Ajax, anything you write needs to be inside the Ajax container.
Trevor(Private) January 31, 2018 at 11:21 am #156259You would need to edit the search.php template to add the form or sidebar.
You should only edit theme files if you are using a child theme (easy to make if you are not, Orbisius do a free plugin to do it for you) and you keep your modified version in the child them folder.
Or use a different template file, so not search.php, but maybe archive.php?
-
AuthorPosts
