web_fsearch_counts Shortcode
The web_fsearch_counts shortcode renders the current faceted-search result counts.
Usage
[web_fsearch_counts]
Attributes
| Attribute | Default | Accepted values | Purpose |
|---|---|---|---|
context |
Current page context | Configured context ID | Binds this counter to the matching results context. Missing or disabled explicit contexts render nothing. |
class |
— | String unless stated otherwise | Adds one or more custom CSS classes to the rendered control. |
label |
Translated result summary | Plain text with {{start}}, {{end}}, {{total}} |
Sets the result range and total message. |
empty_label |
Translated “No results” | Plain text | Sets the message displayed when there are no matching results. |
Faceted search context
Enable and configure Faceted Search in Settings → POM Theme → Content model → Faceted search. Controls, results, and gateways that belong together must use compatible context values.
label defines the normal result-count message and empty_label supplies the no-results message. Use {{start}}, {{end}} and {{total}} instead of hard-coding a number. Existing %1$d, %2$d, %3$d formats and their s variants map to these tokens; other formatting sequences remain literal. Keep the wording short enough to update without moving nearby controls excessively.
Several counters can use different labels for the same active context. A counter explicitly owned by another context is not updated from that active context. The shared runtime supports one interactive context per page. Updates are announced through a polite status region. Numbered pages show the current range; load-more and infinite pagination show the accumulated range.
The Gutenberg equivalent is Faceted Search Counts. Both reuse the same renderer and assets without requiring Page Builder administration.
Test the unfiltered result, a narrowed result, no results, pagination boundaries, and restored URL state. The count must describe the same result gateway shown on the page; avoid placing one standalone counter near multiple independent result areas.
Verification
Test web_fsearch_counts with the configured Faceted Search context, active selections, no selections and an empty result set. Pay particular attention to class and label.