Faceted Search

How does it work?

Faceted is only supported with archive templates, and default WordPress query. You can still set and use the Post or Shop Archive on the home page.

All options, and design is done via Breakdance, which means you never have to leave Breakdance builder while building out your archive pages with Faceted Element.

You can use on the archive pages the following elements:

  • Post List
  • Post Loop
  • Product List, which will require to set Show Products with Query
  • Shop Page
  • Any other default query products/post list

Once you have the Faceted Search on the page, and one of the above elements added, the Faceted Search will sync automatically with the post list query. In some strange scenarios if you require to use something else, or a new element is out that creates another type of list, you can add to the element container advanced CSS the following selector: ‘.destiny-filtered-posts‘. This will set the priority to that post list.

You can have multiple Faceted Elements on the single archive page, for example if you wanted to use Sort By filter on top of the Product List, and then use filters on the left this is possible.

Important Note: Faceted Search won’t work with custom queries, or outside of Archive Templates.

Available Faceted Search Filters and Support

  • Search
  • Taxonomies
    • Supports post taxonomies, custom taxonomies, product taxonomies and product variation attributes
  • Author
    • Supports all roles, or individual roles such as Author
  • ACF
    • Supports all fields (From 26th of Setepmber, 2023)
    • Addionally supports Min/Max Input type that associated with either a dropdown or a range slider
  • Meta Box
    • Support all fields (From 26th of Setepmber, 2023)
    • Addionally supports Min/Max Input type that associated with either a dropdown or a range slider
  • Sort By (Woo)
    • Supports Popularity (based on sales), Price High to Low, Price Low to High, and Date (Newest)
  • Price (Woo)
  • Rating (Woo)
  • Date Range
    • On archive pages the date start time and end time is defined automatically from the earliest and oldest post
  • Reset

Dropdown and Inputs Options

Show Empty Fields

This is set on a global level which will allow to show empty fields for taxonomies, ACF fields, Meta Box fields and Rating.

Show All Options & Show All Text

Show all is set on a global level, which will add show all option to Button Layout, Radio Buttons, Checkboxes and Dropdown.

Show Clear All Button

This available only for the dropdowns, and can customise and change the icon in design options.

Date Picker Options

Date picker option allow to add custom date format, range separator, and also disable the library or loaded either locally or by CDN (for those that have to comply with the GDPR).

Child Options

Non Archive Options

This allow to preform a search from any other page to the archive pages.

In instance where the website will have a search property/cars/etc on the homepage hero, once search is performed it will redirect to that page when search is initiated and will also populate the Faceted Search Fields there.

To enable it simply enable ‘Enable Redirect’, and then set the Redirect Archieve url, for example ‘https://yourwebsite.com/cars/’

The search wil work soon as the any filter input is changed, to disabled this you can enable ‘Search with Search Button’, and that way the search will only iniciate when the search button is pressed.

Note that ‘Search Button’ will need to be added with the ‘Search Button’ input type.

Child Filter

Please note: Child filter is currently available for taxonomies with a Dropdown and Dropdown Checkboxes Input for taxonomies, this will be expanded in the future with more inputs.

This can be useful, for example a car listing, where you want the user to select the make first, and then model of the car, in the example below, we select Audi, and then we have available options for those.

When we select the child it will act as an ‘AND’ relation to the make.

There are a lot of scenarios where this function may come in useful.

Show Children

This allows to show children under the parent taxonomy.

Show children works only with an ‘OR’ relation with parent and child, in the future we are planning to add extra functionality where you would able to modify the relation parameters.

Extra Modifications

Replace default sort with Faceted Search sort in WooCoomerce

You can replace the default WooCommerce sort from Shop Page Element with the below code:
First you will need a plugin such as Code Snippets, and then you add a custom line of PHP line which will remove the default sort.

remove_action( 'woocommerce_before_shop_loop','woocommerce_catalog_ordering', 30 );

Once you have this added, add a div element above the Shop Page element. Make it 100% width, and set layout align to right, and set index on it to 1.

Select the Faceted Search element which has the Sort Filter, add go to advanced and add the following CSS:

.breakdance .bde-rich-text-1984-104 {
  translate: 0 30px; 

And now you will end up with a result like the below, which will still show the product count, and the Sort which will work dynamically.

Copyright © 2024. Digital Destiny. All rights reserved.

Supported by Digital Destiny