User Selections dynamically show each choice the user makes with the available facets on the page. The selections are grouped and displayed per facet and are preceded by the facet’s label.
The user selections can individually be clicked away, which dynamically resets that choice, and updates the results and facets. User selections are a good companion for a Reset facet, which resets all choices at once (or, depending on it’s settings, a selection of facets).
The code of the selections is a
<ul>/<li> construction, with each facet’s choices grouped in a
<li></li>, making them easy to style:
Note: The facet labels which appear before each user selection, are translatable with the facetwp_i18n hook.
Paste the following into an HTML widget, HTML block, or directly into your PHP template file:
echo facetwp_display( 'selections' )
Or use a shortcode:
Shortcodes can be added to the body field of your pages, or into Text widgets (Appearance > Widgets). If you’re using the WordPress 5+ block editor, you can paste shortcodes into a Shortcode block:
If the User Selections are not showing all selected facet options, or are behaving erratically, make sure you do not have any facets with the name “labels”. This is a reserved word that will cause User Selections to malfunction. In newer versions of FacetWP, if you try to enter “labels” as name, it will automatically be changed to “labels_” on save.