web_fsearch_reset Shortcode

The web_fsearch_reset shortcode clears all or selected Faceted Search choices. Gutenberg provides the equivalent dynamic Faceted Search Reset block; see Reset filters in Gutenberg.

Usage

[web_fsearch_reset label="Reset filters" mode="all"]
[web_fsearch_reset context="catalog" mode="include" include="category,price" reset_extras="0"]

Replace context and facet IDs with those configured on your site.

Attributes

Attribute Default Accepted values Purpose
context Empty Enabled context ID Empty follows the page's active results context.
label Translated Reset filters Plain text Visible button label.
class Empty Existing helper classes Adds classes to the normal button.
mode all all, include, exclude Clear all facets, only included facets, or all except excluded facets.
include Empty Comma-separated facet IDs Facets to clear in include mode. An empty list clears none.
exclude Empty Comma-separated facet IDs Facets to retain in exclude mode.
auto_hide 1 1, 0 Hide when no targeted selections or resettable extra controls remain. An unchecked Legacy checkbox also disables hiding.
reset_extras Automatic Empty, 1, 0 Restore Sort and Per Page defaults. Automatic enables this for all mode and disables it for partial resets.
button_style 1 Configured button-style slug Uses an enabled theme style, with a current fallback for unavailable references.
button_size default xs, sm, default, lg, x2, x2-large, x3-large, x4-large Existing theme size helper.

Each include/exclude list is bounded to 500 unique sanitized IDs. Resetting a facet clears its choices, not its global definition or index data.

Context and behavior

Enable and configure Settings → POM Theme → Content model → Faceted search, an index and matching results. Controls share one interactive context per page. Disabled features or unavailable explicit contexts render nothing; controls for other contexts do not alter the active query.

Reset accounts for URL-only selections and pending manual inputs. A partial reset retains unrelated selections. Every reset restarts pagination, while extra controls follow the first matching Sort and Per Page defaults only when requested. Manual searches respect the results listing's Refresh after reset? setting (submit_on_reset). Unrelated URL parameters are preserved.

Both builders use the same renderer, existing button helpers and conditional Faceted Search assets, independently of Page Builder administration.

Verification

Check complete and partial resets, empty results, URL-only selections, changed extra controls, manual-submit policy, automatic hiding and keyboard focus. Test browser Back/Forward and multiple controls using the same context.