How can I display search criteria with search results

By: Dan Zahlis | Asked: 03/15/2023
ForumsCategory: How-toHow can I display search criteria with search results
Dan ZahlisDan Zahlis asked 2 years ago
Is there a way to display search criteria with the results of a custom search? The default behavior of the search filter is to return the search fields to their empty state. I would like to have the search parameters used to filter records displayed in the Before Content area of my custom search. I want the user to know which criteria were used to generate the list of records. Having the search form retain the criteria would be useful or a simple list of the fields used to generate the results. Any ideas?
1 Answers
Victor Font answered 2 years ago
I use browser storage to save search criteria between refreshes. You can see how it works here after you toggle it on: https://formidable-masterminds.com/developers-directory/.
Dan ZahlisDan Zahlis replied 2 years ago

Thanks, Victor. I love the toggle. Did you achieve this using custom code?

Victor Font replied 2 years ago

Yes. It’s custom code. I’ll post the code next week.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right