Category Filter

Displays a dropdown of categories that visitors can use to filter calendar content. Set category_group_id (or id) to choose which category group is listed.

Shortcode:

[category_filter]

Attributes:

Attributes Description
[category_group_id] (Required) The ID of the category group whose categories are listed. You can use id instead.
[id] (Optional) Another name for category_group_id. If both are set, category_group_id is used.
[class] (Optional) The CSS class applied to the dropdown. Default: form-control.
[parent_category_id] (Optional) The ID of a parent category. Only its sub-categories are listed. Default: 0 (top-level categories).
[sort] (Optional) The sort order of the top-level categories. Default: title asc. Sub-categories are always sorted by title.

Code Example:

[category_filter category_group_id="5" class="form-select"]

Output:

Category <select class="form-select" id="category_filter" name="category_filter">
  <option value="">All</option>
  <option value="3" class="font-weight-bold">Community</option>
  <option value="7">- Volunteering</option>
  <option value="4" class="font-weight-bold">Workshops</option>
</select>