Other features

FacetWP provides other features (user selections, pagers, counts, etc) to add to your site.

Display a facet

Shortcode PHP
[^facetwp facet="the_name"]
echo facetwp_display( 'facet', 'the_name' )

Display a template

Shortcode PHP
[^facetwp template="the_name"]
echo facetwp_display( 'template', 'the_name' )

Display a reset button

Here’s a basic example of adding a reset button:

<button onclick="FWP.reset()">Reset</button>

See the reset tutorial for more information (and a full list of options).

Display pagination

Add a pager facet, then paste its shortcode onto the desired page(s).

Display a “per page” box

Add a pager facet (select “Per page” as the pager type), then paste its shortcode onto the desired page(s).

Display result counts

Add a pager facet (select “Result counts” as the pager type), then paste its shortcode onto the desired page(s).

Display user selections

Shortcode PHP
[^facetwp selections="true"]
echo facetwp_display( 'selections' )

Display a sort box

Shortcode PHP
[^facetwp sort="true"]
echo facetwp_display( 'sort' )

Shortcode placement

Shortcodes can be added to the body field of your pages, or into Text widgets (Appearance > Widgets). If you’re using the WordPress 5.0 block editor, you can paste shortcodes into a Shortcode block: