Skip Navigation

[Resolved] Pre-Querying a Parametric Custom Search View

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

Problem: I have a custom search View that includes a taxonomy filter with only two options. I would like to create another custom search View and predefine the selected taxonomy filter in both Views, and I would like to prevent Users from choosing a different taxonomy term in the filter.

Solution: You can combine a custom search View with predefined Query Filters. Set up the other filters as needed, then add your predefined taxonomy term Query Filter. You may have to expose the Query Filter panel by going to Screen Options in the top right corner of the View editor screen.

This support ticket is created 6 years, 5 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.

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 2 replies, has 2 voices.

Last updated by paulJ-9 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#953512

We have a custom Post (Exhibitors) which has an associated taxonomy(class) comprising two mutually exclusive options Business or Users). We have TWO parametric custom search Views that display the same respective information for:
- Business Exhibitors
- User Exhibitors

We want to pre-query each view to display the appropriate information for Business Exhibitors or User Exhibitors respectively. So the view definition should pre-filter the results rather than the user selecting a checkbox to display the corresponding exhibition posts. The QUERY facility would actually be ideal but it does not display on parametric custom searches?

Any suggestions appreciated

#953779

Hi, you can activate the Query Filter section for parametric search Views. In the View editor screen, scroll to the top right corner and click "Screen Options". Here you can choose which interface elements you want to display in the editor screen. Turn on the Query Filter panel to specify certain taxonomy options. Then you can remove the taxonomy filter from the Search and Paginations section, since you do not want your Users to modify the filter setting.

#953831

Perfect solution