The Filter Everything plugin supports four shortcodes that allow you to display the Filters widget, Selected Filters (Chips), Sorting Widget and the Button that opens the Filters widget on mobile devices.
[fe_widget] – allows you to display the Filters widget wherever shortcodes are supported on your WordPress site – in posts content, pages content, widgets, in text blocks created with page builders, etc. Shortcode arguments allow you to change the widget properties.
[fe_widget title="Filters" id="26" show_selected="yes" show_count="yes"]
title– widget title. Optional.
id– Filter Set ID you want to display. Note that this Filter Set must be located on this page. Optional. If you do not specify, the widget with highest priority will be displayed according to its order determined by the Order # parameter in the Filter Set.
show_selected– determines whether to display the selected terms (chips) at the top of the widget. Disabled by default.
show_count– determines whether to display the number of found posts at the top of the widget. Disabled by default.
Selected Filters (Chips)
[fe_chips] – displays a list of selected terms and the “Reset all” button.
[fe_chips id="36" mobile="yes" reset="no"]
id– ID of the Filter Set whose selected terms you want to display. Optional parameter. If not specified, all selected terms of all Filter Widgets on the page will be displayed by default. Of course, the specified term must correspond to the Filter Set, which is located for this page.
mobile– determines whether to display chips on mobile devices. By default, chips are hidden on mobile devices.
reset– allows you to turn off the “Reset all” button and not display it. The button is displayed by default.
Note: if you need to remove existing chips, inserted automatically on WooCommerce pages, add please next code in the functions.php file of your theme or anywhere you can add PHP code.
remove_action('woocommerce_no_products_found', 'flrt_add_selected_terms_above_the_top'); remove_action('woocommerce_before_shop_loop', 'flrt_add_selected_terms_above_the_top', 5);
[fe_sort] – allows you to display Sorting Widget in desired places, where regular WordPress widgets are not available.
id– ID of the Sorting Widget.
How can I find widget id?
It’s a bit inconvenient, but to use this shortcode you must to create a WordPress widget first. Even it will be placed in the Inactive widgets area it will be enough for the shortcode work.
To find desired widget ID, you can insert the shortcode without id parameter, just
[fe_sort] and to check the place, where it will be shown. You will see debug message, that shows you available Sorting Widget ID(s). For example “3” or “4” in our case.
Use the suggested ID in the shortcode to display desired widget.
Filters open button for mobile devices
[fe_open_button] – displays the Filters opening button on mobile devices. The button works with both Filters widget types: the Pop-up Filter widget and collapsible Filter widget which behavior is depending on the plugin settings.
id– determines which Filter Set to open. Optional parameter. By default, the button will open Filter Set with highest priority if there are several of them on the page.