Faceted search is a way to explore or filter large amounts of data by summarizing the data based on its attributes. Out of the box, ElasticPress supports faceting on tags, categories, and formats.
Once you have enabled the Facets setting via the ElasticPress dashboard, follow these instructions to add the Facets content block to your site:
- From the WordPress Admin menu, click the Appearance menu and then the Widgets sub-menu on the sidebar.
- Locate the ElasticPress - Facet widget and drag it to any of your template's supported widget areas.
- Enter a title for the Facets section, select which Taxonomy to facet on (Tags, Categories, Formats, or Custom).
- Next choose how you'd like to order the facets:
- To sort by the number of pages/post results that match each facet item, select Count.
- To sort alphabetically by the facet item name, select Term Name.
- Finally, choose how you'd like to sort the facets:
- To sort in ascending order (A-Z / Smallest to Largest), select Ascending.
- To sort in descending order (Z-A / Largest to Smallest), select Descending.
- Click Save. The Facets widget will now appear on your search results page.