Documentation / Filter Set

Filter Set

Overview

Filter Set is Filters grouped together. Such organization allows you conveniently, literally in few clicks, to change settings common to all filters in the Set. For example, specify pages where they will be located and the Post type they will filter.

Technically Filter Set is a separate WordPress Post type, such as Page or Post, so it has its own menu item in the Administration panel and you can create and edit an unlimited number of Filter Sets.

Filter Set edit screen contains two main Meta Boxes – Filters and Settings. The purpose of the Filters box is to store all the Filters of a given Set.

Common Settings

Name Description
Title The name of the Filter Set. Used only in the WordPress Admin Panel and is not displayed on site pages.
Post type Determines Post type for posts that will be filtered. For example, for WooCommerce products you need to select Post type “Products”
Where to filter?
(Location)
Defines a page or list of pages, where this Filter Set will be applied.
And what to filter?
(WP Query)
Determines what WP Query on the selected page will be filtered. This allows you to filter not only the default WP Query (Main query), but also any custom one.
Empty Terms Defines whether or not to hide in the filtering widget terms that do not contain posts at all.
Show count Determines whether to display the number of posts in the term. Enabled by default.
Hide empty Filters Determines whether to hide the entire Filter from the widget if none of its terms contain posts.
CSS ID or Class of Posts Container Allows you to specify an individual posts container selector for correct AJAX filtering for this Filter Set.
«Apply Button» mode Enables filter mode, which allows you to first select filter criteria and then click “Apply button” and see the results. See example.
Apply and Reset button labels Allows you to set custom labels for these buttons.
Where to Show this Filter Set? This option allows you to specify the page where the Filter Set can be placed, if it is not the same page as for the filtered posts.
It is useful when you need to put Filters widget for example on the Homepage but redirect user to filtering results on a Shop page. See example.
Priority Allows you to set the priority for the filter set. This option is useful on pages where you need to use multiple filter sets and the order in which they appear depends on the given priority.

Where to filter? (Location)

The field Where to filter? supports inheritance from the parent term. Suppose you have a product category “Electronics” and its children categories are “Smartphones”, “Laptops” and “TVs”. If you select “Electronics” for the Filter Set location this Set will automatically appear on the pages of the “Smartphones”, “Laptops” and “TVs” categories.

If you need a separate Filter Set for the child “Laptops” products category, you can create a new one and specify this products category as location for it.

“Apply button” mode + redirect to results page

If you need to place Filters widget on the page that is different from page with filtered posts (in classic situation Filters widget on Homepage, filtered products on the Shop page) you have to specify this page in the field “Where to Show this Filter Set?”. This field becomes available after you activate “Apply button” mode via appropriate checkbox in Filter Set.

Multiple Filter Sets on the same page

You can use several Filter Sets on one page and display several Filter widgets accordingly. Moreover, you can filter different post types at the same time on the same page.

To display two or more different Filter Widgets on a page, you need to add two or more Filter Everything widgets to the page.

The order in which multiple Filter widgets are displayed on a page is determined by the Priority parameter value for each Filter Set. The Filter Set which has higher value of this parameter will be displayed first.

You can also use a shortcode [fe_widget] and use the “id” attribute to explicitly specify which Filter Set to display in the desired location. In this case, the rest of the widgets will take into account the already displayed Filter Set and will automatically display the rest Filter Sets related to the page.

Managing Filter Set

Create a Filter Set

In the WordPress Admin Panel go to the Filters > Add New and you will see the editing screen of the new Filter Set. Fill up the Title field, specify Post type, add new Filters, optionally specify Where to filter? of the Filter Set and publish the Set.

Remove a Filter Set

You can remove Filter Set just like any WordPress post by clicking “Move to Trash” link. In this case all Filters that are in the Filter Set will also be removed. Filter Set with its Filters can be restored from the Trash. But if you delete permanently the Filter Set from the Trash , it will not be possible to restore it.

Make your filtering best with