Skip Navigation

[Resolved] Filter a search with a hidden field

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

Problem: I would like to predefine filter criteria and hide them from the front-end of the View.

Solution: Use the Query Filter panel to add predefined filter criteria.

This support ticket is created 4 years, 9 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 Stina 4 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1523299

I have an archive page with a custom search. I would like to filter the search in the background, so items with a specific filed checked never show up. This filter should not be visible at the frontend. I'm using the block editor and haven't found a way to do this, is it possible?

hidden link

#1524031
Screen Shot 2020-02-23 at 4.43.09 PM.png

Hello, you can use the Query Filter panel to add a filter that is not displayed on the front-end of the site. I'm attaching screenshots here showing you how it is possible. Note in the Block Navigation menu (top left) I have selected the View itself, which will allow me to adjust the Query Filter settings (bottom right). I already have one custom search field added for "Question 1" (upper center). I want Users to be able to select one of the answers to Question 1, but I also want to filter by Question 2. That filter should be predetermined, not manipulated on the front-end of the site. I want to only show results where the answer to Question 2 is 2, and this is what I have configured in the Query Filter panel.

Let me know if you have questions about adding a Query Filter to an existing search View.

#1527163

Thanks, it works!