Filter Widget

Filter Configuration

Download in pdf format

Post Widget Target

This setting specifies the CSS selector for the post widget that the filter will target. You can use either IDs or class selectors. Here are examples of valid selectors:

  • #id (for targeting by ID)
  • .class (for targeting by class)

Ensure that the selector uniquely identifies the target widget to apply the filter correctly.

Post Type to Filter

This option lets you select the type of post you want to filter. For example, you can filter by post types like post, page, or custom post types defined by your WordPress theme or plugins. Choose the post type based on the content you want the filter to target.

Columns

This control allows you to set the number of columns for displaying filter elements. The available options range from 1 to 8 columns. The number of columns you choose will impact the layout and appearance of the filter on your page. Consider the overall design of your website to ensure that the filter is well-integrated and user-friendly.

Group Label

Use this field to enter a label for the filter group. This label can be helpful for categorizing related filters, making it easier for users to navigate through the filtering options. It can also enhance the visual structure of your filter, particularly when multiple filter groups are used.

Data Source

This setting allows you to choose the source of data for the filter. The available options are:

  • Taxonomy: Use this to filter posts based on taxonomy terms (e.g., categories, tags).
  • Custom Field: Use this option for filtering based on custom fields associated with posts.
  • Custom Field (Numeric): Select this option to filter based on numeric custom field values.

Select a Taxonomy

This option lets you choose a taxonomy for the filter. It is available when “Taxonomy” is selected as the data source. You can select from any registered taxonomy, including default ones like category or tag, or custom taxonomies created by plugins or themes.

Custom Field Filter Settings

Field Key

This field allows you to enter the meta key for custom field filtering. It is available when either “Custom Field” or “Custom Field (Numeric)” is selected as the data source. Custom fields are additional pieces of data stored for each post in WordPress, and they are typically used by themes or plugins to store extra information.

What is a Meta Key?
A meta key is like a label or identifier for the custom field. It allows WordPress to know which piece of data you’re referring to when filtering or displaying it.

Finding the Meta Key
If you’re unsure about the meta key for a custom field, you can easily find it by inspecting the post’s custom fields in the WordPress admin. Here’s how:

  1. Go to the Edit Post page in the WordPress admin.
  2. Scroll down to the Custom Fields section (you may need to enable it under “Screen Options”).
  3. Find the custom field you want to filter by, and the key will be listed alongside the value.

Note: The list of available custom fields will only be shown if the correct post type is selected in the filter widget. This ensures that you are only filtering by custom fields relevant to the current post type.

Before

This option lets you insert text before the value in the filter field. It is only available when “Custom Field (Numeric)” is selected as the data source and “Range” is chosen as the filter type. This can be useful for adding units to numeric values (e.g., “$”) or additional context to the values.

Filter Type (Numeric)

This setting allows you to choose the type of filter for numeric custom fields. The available options are:

  • Range: Allows users to specify a range of values (e.g., from $50 to $100). This is ideal for fields like price, weight, or any other numeric range.
  • Checkboxes: Users can select multiple numeric values. This option works well for fields where users might want to choose multiple values from a set (e.g., selecting multiple product sizes).
  • Radio Buttons: Users can select a single numeric value. This is useful when you want users to choose just one option from a list of predefined numbers (e.g., selecting a price range such as $50, $100, $200, etc.).
  • Label List: Displays a list of labels that can be selected. This can be useful when numeric values need to be displayed as human-readable labels (e.g., “Low”, “Medium”, “High” for a range of values).
  • Dropdown: Displays numeric values in a dropdown menu for selection. This option is good for presenting users with a list of values to choose from without taking up too much space on the screen (e.g., selecting a year, quantity, or any other numeric option).

Common Post Meta Fields

If you’re unsure about which custom fields to use or how to set them up, here are a few common examples of post meta fields that are often used in WordPress:

  • Price (e.g., _price, price): Used to store the price of a product or service. Example: A product might have a meta key _price with a value of 19.99.
  • Weight (e.g., _weight, weight): Stores the weight of a product or item. Example: A product might have a meta key _weight with a value of 2.5 (for 2.5 kg).
  • Dimensions (e.g., _length, _width, _height): Used for storing the dimensions of a product or object. Example: A product might have meta keys _length, _width, and _height with respective values 10, 5, and 8 (in centimeters).
  • Stock Status (e.g., _stock_status, stock_status): Used to determine whether a product is in stock or out of stock. Example: A product might have a meta key _stock_status with a value of in_stock or out_of_stock.
  • Custom Ratings or Reviews (e.g., _rating, _reviews): Stores user ratings or reviews for a product, service, or post. Example: A product might have a meta key _rating with a value of 4.5 or _reviews with a collection of review data.
  • Event Dates (e.g., _event_date, event_date): Used for storing event dates. Example: An event might have a meta key _event_date with a value of 2025-05-15.

Field Type and User Interaction

Field Type

This setting allows you to choose the type of filter for custom fields. The available options are:

  • Checkboxes: Multiple selections allowed.
  • Radio Buttons: Only one selection allowed.
  • Label List: A list of labels that can be selected.
  • Dropdown: Displays options in a dropdown format.
  • Select2: An enhanced dropdown with search functionality.
  • Input Field: Allows users to input their own value.

Enable Multiple Select

Enable or disable multiple selections for the Select2 field type. This feature allows users to select multiple terms from the dropdown, providing a more flexible filtering experience when dealing with multiple values.

Placeholder

This field lets you set a placeholder text for the input field filter type. Placeholder text can guide users by showing them what type of data to enter, such as “Enter a value” or “Search terms.”

Sorting and Display Options

Sort By

This option lets you choose the criterion for sorting terms. The available options are:

  • Name: Sort terms alphabetically by name.
  • Slug: Sort terms by their URL-friendly version.
  • Count: Sort terms by the number of posts associated with them.
  • Term Group: Sort terms by their term group.
  • Term Order: Sort terms based on the order defined in the WordPress admin.
  • Term ID: Sort terms by their unique identifier.

Display Empty Terms

Choose whether to display terms that have no posts associated with them. Enabling this option might help users see all possible filter choices, even if some terms don’t currently have posts.

Grouping Filters and Logic

Group Logic

This setting allows you to choose the logical operator for grouping filters. The logic will only apply within the same group of filters. The available options are:

  • OR: Any filter in the group can match.
  • AND: All filters in the group must match.

Show Post Count

Enable or disable the display of post counts next to each term in the filter. This can help users understand how many posts are associated with each term, providing additional context when making filtering decisions.

Show Hierarchy

This option allows you to enable or disable the display of hierarchical terms. Available for specific field types and taxonomies, this can help display parent/child term relationships, enhancing the organization of terms like categories or tags.

Toggle Child Terms

This option allows toggling child terms within hierarchical displays. When enabled, users can click to expand or collapse child terms in a taxonomy. This setting is available for specific field types and taxonomies, offering greater flexibility in displaying hierarchical data.

Advanced Filter Settings

More/Less

Enable or disable the “More/Less” functionality for non-list, non-dropdown, and non-Select2 fields. This functionality allows users to expand or collapse the filter options, making the interface more compact when there are too many choices. This is not applicable to Numeric filters.

More/Less (Numeric)

Enable or disable the “More/Less” functionality for Numeric fields. This is specifically for non-list, non-dropdown, and non-Select2 fields and excludes range filters. It allows you to limit the number of displayed options and let users toggle to see more if needed.

Reset and Submit Controls

Filter List

This control lets you manage a list of filters with their titles and criteria. By default, the list includes:

  • Filter by category

You can customize this list to include additional filters based on taxonomy, custom fields, or any other criteria you want to offer.

Parent Options

This section allows you to configure settings for parent filter options. Parent filters typically determine how child filters behave, enabling more complex filtering scenarios.

Parent Logic

This setting defines the logical operator for parent filters. It applies only to groups of filters that share the same type (either post meta or taxonomy). The available options are:

  • AND: All filters in the group must match.
  • OR: Any filter in the group can match.

Display and User Experience

Dynamic Archive Filtering

Enable or disable the dynamic filtering of archive pages. This setting applies to taxonomy archives or custom post types, allowing you to filter results directly on the page.

Display Reset Button

This option allows you to enable or disable the reset button.

Reset Button Text

This field allows you to set the text for the reset button. This option is only applicable if the reset button is enabled.

Display Submit Button

This option allows you to enable or disable the submit button.

Submit Button Text

This field allows you to set the text for the submit button. This option is only applicable if the submit button is enabled.

Scroll to Top

This option allows you to enable or disable automatic scrolling to the top after applying the filter.

Nothing Found Message

This field allows you to set the message displayed when no results are found. The default message is: “It seems we can’t find what you’re looking for.”