A filter is an entity by which you want to filter the products. The filter settings depend on which type of filter you are going to use.
|Filter Title||Give a title to the filter that will appear before the filter options.|
|Filter Type||Determines the type of entity by which the products will be filtered. It can be Taxonomy, Price, Rating, Product Status, Post Author, Post Meta, Sort By, and Per Page.|
|Meta Key||If the filter type is Post Meta, select the Meta Key for which values will be available as filter options.|
|Value Type||If the filter type is Post Meta, select the Value Type for the Meta Key. Available options are Text, Number, and Date.|
|Filter Key||The unique key that will be used in the URL. Only a-z, 0-9, “_” and “-” symbols are supported.|
A filter type is the type of entity by which the products will be filtered. For the post-meta filter, you need to specify the meta key and value type.
The filter type can not be changed once it is saved. But you can permanently delete the filter and add a new one.
You can’t use the same “Filter Type” value multiple times in a form except for the components Active Filters, Reset Button, and Results Count.
A filter key is a unique key that identifies the filter. When you apply a filter, you will see this in the URL with a filter value. Suppose you have a filter to filter the products by color in which you might want the filter key to be color. After you apply the filter, you will see something like
www.site.com/shop/?color=blue in the URL.
You can’t use the same filter key for multiple entities. It means the filters with the same “Filter Type” value will have the same filter key. Once a filter key is set, you can not change it from the filter. Go to WCAPF > Settings > Filter Keys page to change the filter key.
|Display||Determines the display type of filter options in the front end.|
|Layout||Determines the layout of the filter options in the front end.|
|Columns||Determines the number of columns for the grid layout.|
|Multiple Selection||Determines if the user can select multiple options when filtering products.|
|Query Type||OR: products that matched any option, AND: products that have both options.|
|All Items Label||Change the default option label. Leave blank to use the default label.|
|Show hierarchy||Whether to show the filter options as hierarchical.|
|Enable hierarchy accordion||Whether to enable accordion for the hierarchy filter options.|
|Show count||Whether to show the product count in filter options.|
|Enable tooltip||Display additional information in a tooltip when users hover over the option.|
|Tooltip position||Determines on which side the tooltip will be placed.|
|Count in tooltip||Enable this to show the product count in the tooltip.|
|Enable swatches||Should the filter options be displayed using color/image swatches?|
|Swatch type||Select the swatch type, color, or image.|
|Swatch with label||Enable this to display the label beside the swatch.|
|Display slider values as||Determines how the slider values will be shown in the front end.|
|Input type number||Enable this to hide units and display them as spinbox with up and down arrows.|
|Date Display Format||Determines how the date will be displayed in the front end.|
|Inline Date Inputs||Whether to show the date input fields in a single line.|
|Use dropdown for Month||Whether to show the month dropdown in the date picker.|
|Use dropdown for Year||Whether to show the year dropdown in the date picker.|
“Display slider values as” and “Date Display Format” fields are available when the value type is Number.
“Date Display Format”, “Inline Date Inputs”, “Use dropdown for Month”, and “Use dropdown for Year” fields are available when the value type is Date.
The value of the “Display” field defines how you want to show the filters in the front end. The available options depend on the Filter Type.
For the taxonomy filter, you can show the terms in Checkbox, Radio, Select, Multiselect, Label. You can also enable Color/Image Swatches for taxonomy filter options.
For the Price filter or Post Meta(value type Number) filter, available options are Range – Slider, Range – Number, Range – Checkbox, Range – Radio, Range – Select, Range – Multiselct, and Range – Label.
For the value type Date filter which is a pro feature, available options are Input – Date, Input – Date Range, Time Period – Checkbox, Time Period – Radio, Time Period – Select, Time Period – Multiselct, and Time Period – Label.
You can specify the design of the filter options by defining the Layout. The Layout setting is only available when the value of the “Display Type” field is any of these: Checkbox, Radio, Label.
The available options for the “Layout” field are List, Inline, and Grid. For the grid layout, you can specify the number of columns between 1 to 12.
For Label, Color Swatch, and Image Swatch display types, you can enable the setting Multiple Selection. If it is enabled, the users will be able to filter the products by selecting multiple options in the same filter.
|Get Options||Determines whether you want the options to be obtained automatically or if you prefer to add them manually.|
|Order By||Select the criteria by which you want the items to be ordered.|
|Order Direction||Whether to order options in ascending or descending order.|
|Limit Options||Limit the filter options.|
|Terms to include||Select the terms that will be available to filter by.|
|Terms to exclude||Select the terms that will be excluded from the filter by options.|
|Parent Term||Select the parent term for which child terms will be available as filter options.|
|Authors to include||Select the authors that will be available to filter by.|
|Authors to exclude||Select the authors that will be excluded from the filter by options.|
|Author Roles||Select the roles; matched authors must have at least one of these roles.|
|Auto-detect min and max||Whether to detect the min and max values from the database.|
|Min Value||The minimum value that a user can select.|
|Max Value||The maximum value that a user can select.|
|Step||Determines the size of the increment amount.|
|Gap||Determines the gap between the ranges.|
|Value Prefix||This should be used for the unit, space(s) allowed. Example: $|
|Value Postfix||This should be used for the unit, space(s) allowed. Example: €|
|Values Separator||Text to appear between the min and max values, space(s) allowed. Example: –|
|Format Numbers||Enable this if you want to format the numbers.|
|From Prefix||Text to appear before the From field.|
|From Postfix||Text to appear after the From field.|
|From Placeholder||The placeholder text to appear for the From field.|
|To Prefix||Text to appear before the To field.|
|To Postfix||Text to appear after the To field.|
|To Placeholder||The placeholder text to appear for the To field.|
Authors to include, Authors to exclude, and Author Roles are available for the post-author filter.
Auto-detect min and max, Min Value, Max Value, Step, Gap, Value Prefix, Value Postfix, Values Separator, and Format Numbers are available for the Price filter and Post Meta(value type Text) filter.
From Prefix, From Postfix, From Placeholder, To Prefix, To Postfix, and To Placeholder are available for the Post Meta(value type Date) filter.
The value of the “Get Options” field defines if you want the filter values to be populated automatically or manually enter the filter options. In the PRO version, you can configure the filter options using the Manual Options table.
For the taxonomy filter, the available options are ID, Name, Slug, Count, and Include/Entry.
For the post author filter, the available options are ID, Name, Count, and Include/Entry.
The “Order By” field for post meta filter is a pro feature. The available options when “Value Type” is “Text” are Value, Label, and Count. When getting the options automatically, you can specify the “Order Type” of meta values to either Alphabetical or Numerical.
When getting options automatically, you can include the terms and sort the options by the “Include” order. When you enter the filter options manually, you can sort the options by the “Entry” order.
The field is only available when getting the options automatically.
Limit Options for Taxonomy Filter
In the taxonomy filter, you have several options to limit the available terms: Include, Exclude, Child of, and Parent only. The options “Child of” and “Parent only” are applicable when the taxonomy is hierarchical, meaning it has parent-child relationships.
When using the “Terms to include” and “Terms to exclude” options, selecting the “Include children” checkbox means you want to include the child terms along with the selected terms. This allows users to filter by both the selected terms and their child terms.
When using the “Parent Term” option, selecting a parent term will make the children of that term available as filter options. The “Direct Children” checkbox specifies that only the first-level children will be displayed as filter options.
If you choose “Parent only” as the value, only the first-level terms (parent terms) will be available for selection in the filter. This option excludes the child terms from the filter options.
Limit Options for Post Author Filter
In the post author filter, you have three options to limit the available authors: Include, Exclude, and Role.
If you choose “Include,” you can specify the authors that will be included as filter options. Only the selected authors will be displayed in the filter for users to choose from.
If you choose “Exclude,” you can specify the authors that will be excluded from the filter options. These authors will not be shown in the filter, allowing users to filter by other available authors.
Alternatively, if you select “Role,” you can choose specific roles. The filter will display authors who have at least one of the selected roles. This allows you to filter by authors based on their assigned roles.
When displaying the filter options using color or image swatches, or you want to use a custom label or tooltip for the filter option, you need to use the manual options table. You can customize the filter options as per your need using the manual options table.
For the taxonomy or post-author filter, you can leave the Label and Tooltip fields empty if you do not want to modify them.
|Show title||Whether to show the filter title before the filter options.|
|Enable accordion||Place more filters by collapsing the filter options.|
|Accordion state||Determines how the accordion should appear initially.|
|Help Text||Show additional information in a tooltip. Supports basic markup.|
|Search Field||Adds a search field to narrow down the filter options.|
|Placeholder||Change the default placeholder for the search input field.|
|Reduce height||Enable this if you want to reduce the filter height.|
|Filter max-height||Set the filter container max height in px.|
|Number of visible options||Show a “Show More/Show Less” toggle after this many options.|
|Show in Active Filters||Determines if we show the selected options in active filters.|
For “Select”, and “Multiselect” display types, the search field is available when the ComboBox is enabled from plugin settings. In the “Multiselect” display type, “Search Field” is always enabled.
When showing the options of a taxonomy filter in a hierarchical view, “Search Field” is not possible.
Setting a placeholder text for the Search Field is a PRO feature.
In Select and Multiselect display types, the placeholder is not available.
You can limit the height of the filter block in two ways.
One is settings the max height of the filter block. So you need to scroll down to see the full options in the filter.
Another is to show the first (n) options by default. You can show/hide the hidden options in the filter by clicking a toggle. Soft limit is not possible when showing the options of a taxonomy filter in a hierarchical view.
Active Filters, Reset Button, and Results Count are the components in a form. You can also show these components in the front end using shortcodes, please see the shortcodes guide.
Add a Filter
On the edit screen of a Form, click the Add Filter button, and configure the filter settings. Finally, Save the filter.
Remove a Filter
On the edit screen of a Form, open the filter by clicking on the filter bar if it’s not already opened. Click the Delete button on the bottom-left, and a confirmation tooltip will appear, confirm it, and the filter will be deleted. Finally, Save the filter.
You can change the order of the filters in the form by dragging the filter to the top or bottom. Don’t forget to save the form.