I'm trying to make search filter on the top of the page but i'm getting all items listed! See attached photo "show-all.jpg"
I do not want to show any item before user start to use filters. See attached photo "no-search.jpg".
I have filters with some categories listed in dropdown. f.ex:
- Select target group
Group 1
Group 2
Group 3
I want to show only filters but not items.
- Select target group - - Choose dentists - - Search - - x Clear filters -
No content below.
See attached photo "no-search.jpg"
If user make search than i will list those items from that category below filters.
See attached photo "show-all.jpg"
Where:
- Adjust the 99999 with your original view ID
- adjust the post__in so that it should be called only when there in no URL param available.
If you do not know how to do it, please share problem URL where you added the view and access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
The thing is that, you are using Custom Search option "Show only filter options that would produce results" and when we set the results to display only no results on first page load, the filters will not display any values as there is no results there will be no values for the filters.
Is that OK if I change the filters to search with "Submit" button, then we can track the submit action using the URL param and switch the case to no result to display the results.
Dear Minesh,
i tried that you recommended and it's working unless you press Clear all filters button.
Than it displaying everything.
When press on clear all filters button I will to reset only filters and hide results.
Just like you come first time on the page.
Another issue is if you have more loops on the same page it will hide all of them and show them once you make some filter search.
But that i resolved by adding custom CSS ID to View. You can see that on the front page, i created search filters there.
I know meaning of reset button, but that i want is to manipulate it and just do it like i described in my previous post.
Can you tell me how to do that or where to look to manipulate that.