Options#
| Option | Values | What it does |
|---|---|---|
type | select, checkbox, radio, pill | Chooses the generated control type. |
show_count | boolean | Shows the post count beside each term. |
showCount | boolean | Same as show_count. |
hide_empty | boolean | Hides terms with no posts. |
hideEmpty | boolean | Same as hide_empty. |
Boolean options can be written without a value:
{{ filter:category type="select" show_count hide_empty }}Default Behavior#
If no type is given, TemplateX renders checkbox inputs.
{{ filter:category }}The generated controls use the taxonomy slug, the term slug, and URL parameters. They do not add theme styling for you.
With Automatic Search#
Filters inside a search form make the form enhanced, even when auto is not written:
{{ search }} {{ filter:category type="radio" }}{{ /search }}Changing the filter updates the URL and refreshes the matching query results.