Skip Navigation

[Resolved] Custom search and filter combination

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to combine a text search field with a set of filter checkboxes, but I would like them to appear in separate locations.

Solution: The text search field and the checkboxes filters must be added in the Filter Editor section of the View. You can add any markup necessary to design the search form so that the filters are rearranged.

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.95 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#769279

I am trying to:
Create a page where users can search on a word through the search form in views. This should run after the user click the search button(or hits enter)

Link to a page where the issue can be seen:
hidden link

I expected to see:
A search that runs after clicking the submit button. And a separate category filter that runs before or after the custom search. Where the results change(ajax) after changing filter values

Instead, I got:
A submit button that can only run a combined filter + search query. If the above is not possible i would like to have the search run after the users hit enter, which it also does not do right now.

#772728

Instead, I got: A submit button that can only run a combined filter + search query.
I'm not sure I fully understand what you would like to accomplish. Will this work?
- In the Custom Search settings for this View, choose the option "AJAX results update when visitors change any filter values"
- Insert a text search field and a submit button in the Filter Editor
- Insert the category filter in the Filter Editor
- In the Loop Output editor, include the information about each post

I created a mockup search View here you can interact with:
https://christiancox-22119-rtl-1.discover-wp.com/team-member-search/
Please let me know if I've misunderstood your request.

#785149

Hi i think i found out what cuases the problem through your awnser. I placed the search function in the output textfield becasue of the way the client wanted it styled. When i put the search on the filter box it does work.

Is there any way of splitting the location of the category filter and the text search?

#785587

The text search field must be in the Filter Editor area, but you can add any HTML markup necessary in the Filter Editor, Loop Output Editor, and Filter / Output Integration editor to make it look like the search field and checkboxes are separate. For example, you can create a full-width div that contains the text search, submit button, and sorting options. Then in the next row, create a column using CSS that contains the checkbox filters, and create another column using CSS that fills the remaining space and holds the results.