Forums › Forums › Search & Filter Pro › Page Reset – Issues????
Tagged: reset button, Search Page Refresh
- This topic has 8 replies, 2 voices, and was last updated 6 years, 5 months ago by Trevor.
-
Anonymous(Private) May 14, 2018 at 7:20 pm #177518
Hi Designs and Code:
On the main search page https://fellowone.com/fellow-one-research/search/?_sf_s=Body+Type, using short code, when the page first opens, it is a blank search, which is how i want it.
When i do a search, it populates correctly. However, when i hit reset, it will reset the search field to blank, but, still leaves the old search results. http://recordit.co/Rk9jsiOieK
None of the fields reset. If i have done no search via keyword, and choose sort by, say, date, it sorts and shows results but, again, no keyword search was done. And, if i reset and then click direclty on the https://fellowone.com/fellow-one-research/search/link to refresh the page,the sort field is still set on date; VIDEO: http://recordit.co/oH0sHkYWTZ
How do i get the reset button to reset the page so that it starts fresh, for all fields, with no search results showing?
Trevor(Private) May 15, 2018 at 1:40 pm #177632Hi
We need to see where the issue lies. Can you follow the guide to make a Shortcode Display Results search type? It won’t look so pretty, but will make testing to find the problem easier:
https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
Anonymous(Private) May 15, 2018 at 4:46 pm #177690Anonymous(Private) May 15, 2018 at 5:12 pm #177702Ok, that is done: http://recordit.co/qfw20tMiB2
But, I not want any search results showing at all upon first landing on the page.
And, when the reset button is hit, i want the page to clear completely, only showing the search options.
Trevor(Private) May 15, 2018 at 5:20 pm #177706With our Shortcode method, in the documentation link I gave you, is the guide to customising.
Once you have a copy of the results.php file in a
search-filter
sub-folder of your theme, you can edit that file, like this (leave the PHP comments at the top outside and before this code):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 { // the results.php PHP code here }
Anonymous(Private) May 15, 2018 at 6:57 pm #177711Using the shortcode method, I have tried overriding the results.php by putting a new results.php in fellow_one/search-filter-pro/ and fellow_one/search-filter-pro/templates and I have not been able get any changes to show up on the page.
File Location Screenshot: http://prntscr.com/ji9mu8I made recommended code changes in that results.php file:
Screenshot: http://prntscr.com/ji9l11And there’s still no change to the page:
Video: http://recordit.co/HLKmFG5lhJ -
AuthorPosts