In order to enable your visitors to search your site Query Elements comes with a few filter widgets.
- Checkbox Ranges
- Date Ranges
- Radio Buttons
- Search (text based searches)
The query parameter that you enter on some of the widgets is what you will use to connect the filter widget with the archive widget. If you do not enter the correct query parameter in your Archive widget it will not know which value to use.
Taxonomies and query parameters
Depending of filter widget setting you need to enter a the name of the query parameter that should be connected with the widget. This is also the query parameter you need to use when configuring the Archive widget.
The only scenario that does not require entering a query parameter name is when value types are Categories or Tags. In these cases the query parameter is predefined. The query parameter is also predefined when using the Search filter widget.
Tags and categories
Checkboxes, Radio Buttons and Drop down all have the same “Value” section in the Query tab. Just select the value type you want to show. When using taxonomy option see previous section on how to configure.
The query parameter for tags is “tag” and “cat” for categories.
You can style the colors regarding the check boxes and of course also style the labels.
Checkboxes lists checkboxes with labels. Pretty simple.
Configuring the checkbox range is simple. Enter the query parameter you want to use with the filter (No spaces or special characters). Prefix and postfix adds text before and after the value in the ranges.
Then add a few range items with a min and max value. Make sure they don’t overlap since that defeats the purpose.
Checkbox range is pretty simple, it just display checkboxes and corresponding range of values.
Date Range lists a range of time periods as either radio buttons or a dropdown.
The dropdown is configured the same as the checkboxes widget.
The radio buttons widget is configured the same as the checkboxes widget. You can style the buttons color, border, dot and so forth.
The search filter widget is pretty simple. Just drag it to the page and style it. The default query paramenter is “s” same as WordPress search default.
You can choose between two control types, single or range. Single is a widget with just one slide handle, range gives you two slide handles.
You need to set a minimum value, a maximum value, default values and also the step value.
If you use the control type Range the query parameter will automatically have _min, _max appended to the end of the string. This is good to remember when you integrating the Slider with the Archive widget meta query.
You can style the various parts of the slider such as handle size and color, borders and much more.
When the toggle is toggle on the query parameter will have the value that you have entered. When it’s toggled off then the query parameter is not added to requests.