Help Center
Radio Filter Overview

Radio Filter Overview

This guide is about the “Radio” Filter type, which is available as a part of the JetSmartFilters plugin for WordPress functionality.

The “Radio” Filter Type allows one to create a filter with several options for selection, where only one option will be picked as a result.

The filter can be built by proceeding to the WordPress Dashboard > Smart Filters > Add New page.

Filter Settings

The first part of the settings includes the following fields:

edit filter page
  • Filter Name — a name to identify the current filter;
  • Filter Type — a list of options that contains different kinds of filters. Now, the “Radio” option should be picked.

Data source

Initially, one should determine the Data Source of the filter. Depending on the selected source, the following settings vary.

The Data Source defines where the data to filter the content will be pulled. Among the options are: “Taxonomies,” “Manual Input,” “Posts,” and “Custom Fields.”

Things to know

If the JetEngine plugin is installed and activated, the “JetEngine Custom Content Types,” “JetEngine Glossary,” “JetEngine Query Builder,” and “JetEngine Query Builder Switcher” Data Source options also become available. Some of them appear only when the corresponding modules are activated.

Taxonomies

This option will take the data from the selected taxonomy. For instance, it can be categories, tags, or product taxonomies used for an online shop.

taxonomies data source
  • Taxonomy — the taxonomy that will be used for filtering;
  • Add all option — if enabled, this toggle adds the “All” option to the list of options;
  • Ability to deselect radio buttons — if enabled, this toggle allows users to deselect radio buttons in the filter;
  • Show empty terms — if enabled, the empty terms that have no items assigned to them will also be shown on the list;
  • Show only childs of current term — on the parent category archive, only its child categories will be shown. On all other pages, all categories will be displayed;
  • Group terms by parents — this option should be switched on to save the hierarchical structure where child terms are listed under the parent ones. If enabled, the Collapsible toggle becomes available that, if activated, makes the child objects collapsible under the parent ones;
  • Is Checkbox Meta Field — this option should be enabled to filter items by the Checkbox meta field saved as an array, Select meta field saved as multiple select, Posts meta field saved as multiple, or Checkbox meta field of ACF. This option is mainly used for filters with the Custom Fields source;
Things to know

The Is Checkbox Meta Field option should be disabled if the “Taxonomies” Data Source is selected. This option should only be enabled when filtering by custom meta fields mentioned above.

  • Exclude/Include — a feature that can be used to include or exclude some of the terms so they will be or will not be shown in the options list;
Things to know

The “None” option in the Exclude/Include setting should be chosen if no terms should be included or excluded.

  • Use Custom Query Variable — this setting is not required for the “Taxonomies” Data Source. This setting can be enabled to filter related items by the Relations feature of the JetEngine plugin. For example, if the given taxonomy is the child object or the parent object in a relation, it is possible to use this taxonomy to filter the related objects. Follow another tutorial to find more information on how to filter related items;

Manual input

This source allows adding the Radio Filter options manually. Among unique settings are:

manual input data source
  • Options List — an area where the manual options can be added and edited by clicking the “Add New” button;
  • Query Variable —  an obligatory field where the query variable key should be put. When filtering by a meta field, one should copy and paste the Name/ID of the meta field into the Query Variable field. Multiple field keys should be separated with commas;
  • Comparison operator — a selector with operators to pick the way the above value will be compared.

Posts

Posts can also become a source for the filter. This source includes the following unique setting field:

posts data source
  • Post Type — a post type that will be used as the source for filtering.

Custom Fields

The “Custom Fields” source allows customizing the following set of fields:

custom fields data source
  • Custom Field Key — a custom field key that will be used as the source for filtering;
  • Get Choices From Field Data — the setting that makes the filter take the filter options from the options of the meta field.

JetEngine Glossary

The option is available if the JetEngine plugin is installed and activated. To make the Glossary a filter source, one should fill in the following settings:

jetengine glossary data source
  • Select glossary — a glossary that will serve as the data source.

JetEngine Query Builder

The option is available if the JetEngine plugin is installed and activated. The source, in this case, is the Query from JetEngine; it includes the following settings:

jetengine query builder data source
  • Select Query — a query that will serve as the data source;
  • Property to Get Value from — a field that indicates where the value for the options will be taken. By default, it is set to “ID”;
  • Property to get Label from — a field indicating where the options’ label will be taken. By default, it is set to “post_title.”

Read more about How to Create Filters with Query Builder Source.

JetEngine Query Builder Switcher

The option is available if the JetEngine plugin is installed and activated. This source allows switching between content queries.

jetengine query builder switcher data source

Find out more about How to Set Query Builder Switcher Data Source.

Use Default Filter Value

Use Default Filter Value is a toggle that activates the Default Filter Value field. Values there can be separated by commas; they will be applied to the provider once via an Ajax request when the filter is added to the page.

use default filter value toggle

Filter Labels

At the end of the page, the Filter Label and Active Filter Label fields can be completed.

filter labels

The filter can be saved by pushing the “Update” button.

Filter in Gutenberg

The filter can be displayed in Gutenberg with the help of the Radio block.

General

The first General tab includes the following settings:

radio filter general settings in gutenberg
  • SELECT FILTER — the filter that will be displayed;
  • THIS FILTER FOR — the filter provider to attach the filter; 
  • APPLY TYPE — the way how the filter results will be shown, with page reloading (“Page Reload”), without (“AJAX”), or with the “Mixed” option.
Warning

When using the “Page Reload” option, the “Apply” button should be used. Also, note that both the “Page Reload” and “Mixed” options change the page’s URL.

  • APPLY ON — the action that will trigger the filter;
  • Show apply button — a toggle that adds an “Apply” button. If activated, the APPLY BUTTON TEXT can be changed;
  • Show filter label — a toggle that displays the filter label above the filter;
  • QUERY ID — a field that can be used if several widgets of the same type are on the same page, and one is supposed to be used as a provider. For instance, if there are two Listing Grids on the page and only one should be filtered, the Listing Grid settings (Advanced tab) should be opened, and its unique name should be set in the CSS ID field and then put here, in the Query ID field of the filter;
  • Additional Providers Enabled — a toggle to apply the filter to several providers. If enabled, one can specify the ADDITIONAL PROVIDER and ADDITIONAL QUERY ID values for every new provider added.

Additional Settings

The Additional Settings tab presents four toggles. These are deactivated by default, but each toggle displays additional settings if enabled.

radio filter additional settings in gutenberg

Search Enabled

search enabled toggle
  • Search Enabled — a toggle that activates search above the filter;
    • Search Placeholder — a text displayed in the search bar that can be changed.

More/Less Enabled

more or less enabled toggle
  • More/Less Enabled — a switcher that shows the “More/Less” labels below the filter to hide/show items. If activated, the following fields appear:
    • Less Items Count — a field where the number of items displayed by default should be specified;
    • More Text — a text on the “More” button;
    • Less Text — a text on the “Less” button.
dropdown enabled toggle
  • Dropdown Enabled — a feature that hides options in a dropdown list. Once activated, the following features appear:
    • PLACEHOLDER — a text displayed in the dropdown;
    • N Selected — a feature that hides options labels and shows a number of selected options after the N-item:
      • Number of Named Items — a field where the number of shown labels can be specified. For instance, if “3” is set, after three labels, there will be a text “and 1/2/3… others” shown;
      • Generic text — a text displayed after labels. Mind that a {number} macro should be used in the text to generate value afterward.

Scroll Enabled

scroll enabled toggle
  • Scroll Enabled — a feature that adds scroll next to Radio;
    • SCROLL HEIGHT(PX) — a field to complete the height of the scroll in pixels.

Indexer Options

Initially, the Indexer Options tab includes only one toggle called Apply indexer.

radio filter indexer settings in gutenberg

Once the previously mentioned toggle is activated, the following settings appear:

apply indexer and show counter toggles activated
  • Show Counter — a toggle that enables the counter for the number of available options currently displayed on the page. Once activated, the COUNTER PREFIX and COUNTER SUFFIX fields are available for customization;
  • IF ITEM EMPTY — the action for the empty options;
  • CHANGE COUNTERS — a drop-down list that allows setting whether to change counters when filters are applied.

Advanced

Advanced is a unique Gutenberg tab that allows setting only one field:

radio filter advanced settings in gutenberg
  • ADDITIONAL CSS CLASS(ES) — a field where the CSS class can be put.

Also, one can install and activate the free JetStyleManager plugin to style the block.

Filter in Elementor

In Elementor, the Radio Filter widget is available. Its settings are the same as in the Gutenberg editor.

radio filter content settings in elementor

Filter in Bricks

The Bricks builder also comprises the Radio Filter element, the settings of which are the same as in Gutenberg.

radio filter content settings in bricks

Front End Result

The result can be later checked on the front end. Now, the Radio Filter is active.

radio filter result

That’s all about the Radio Filter available with the JetSmartFilters plugin for your WordPress website.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.