The Dynamic AJAX Product Filters plugin allows you to integrate filters into your WordPress site using shortcodes. While shortcodes are available, we highly recommend using our dedicated blocks and widgets instead. Blocks provide a more user-friendly interface for managing all filter settings in one place.
Learn more about using blocks and widgets in different editors:
- Using Filters in the Widget Area
- Using Filters with the Block Editor (Gutenberg)
- Using Filters with Elementor
General Shortcode Usage
Show All Filters Shortcode
- Show All Filters:
- Use the shortcode
plugincy_filtersto display all available filters. This can be placed anywhere — in sidebars, on any page, in widgets, or within the customizer. It works with both free and pro versions of any WordPress theme.
- Use the shortcode
This shortcode accepts several attributes for fine-tuning:
- layout – Choose between
sidebarortop_viewlayouts. - product_selector – Target the product container for filtering.
- pagination_selector – Target the pagination container.
- mobile_responsive – Choose between
style_1tostyle_4for mobile responsiveness. - attribute – Specify a product attribute to display filters for.
- terms – Define terms for filtering (comma-separated).
- category – Show filters for a specific category.
- tag – Show filters for a specific tag.
Example:
[plugincy_filters layout="top_view" mobile_responsive="style_2"]Note:
If you are using WooCommerce’s default products shortcode to display products, you do not need to set attribute, terms, category, tag, product_selector, or pagination_selector.
Our plugin will automatically detect and connect to the products output. You can still use these attributes manually if needed.
Single Filter Shortcode
- Single Filter (Button Style):
- To show a specific filter as a button style, use:
[plugincy_filters_single name="attribute_id"]Replace "attribute_id" with the actual ID of the attribute you want to filter by.
Showing Selected Filters
- Currently Selected Filters (Chips Widget):
- To display currently selected filters above the products, use:
[plugincy_filters_selected]Place this shortcode above your product listings or anywhere you want to show the selected filters.

Using Shortcodes in Different Contexts
Use in Sidebar Process
- To add filters to a sidebar:
- Go to Appearance > Widgets in your WordPress dashboard.
- Drag a Text or Custom HTML widget to the desired sidebar area.
- Paste the shortcode
plugincy_filtersor any specific filter shortcode inside the widget. - Save the changes.
Use in Page Process
- To include filters on a specific page:
- Edit the page where you want the filter to appear.
- In the content editor, simply paste the shortcode
plugincy_filtersor any specific filter shortcode. - Update or publish the page.
Using PHP Code Process
- To use shortcodes in theme files or custom PHP code:
- Open the PHP file where you want to add the filter (e.g.,
header.php,footer.php, orpage.php). - Use the following code to execute the shortcode:
- Open the PHP file where you want to add the filter (e.g.,
<?php echo do_shortcode('[plugincy_filters]'); ?>Replace plugincy_filters with any specific filter shortcode as needed & Save the file.
By using these shortcodes, you can seamlessly integrate the Dynamic AJAX Product Filters into your WordPress site, enhancing user experience and improving product navigation. Whether in sidebars, pages, widgets, or through PHP code, these filters are highly adaptable and easy to implement.
Best Practice: Use Blocks or Widgets Instead of Shortcodes
While shortcodes provide flexibility, managing attributes manually can be cumbersome. Using blocks or widgets is recommended because they:
- Provide a visual interface for configuration.
- Centralize layout and style settings.
- Ensure better compatibility and responsiveness.
Explore guides for your editor of choice: