30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

List Event Categories

events/list-event-categories returns every event category with the number of events in it, empty categories included.

It exists for the count. Everything else about event categories is ordinary WordPress taxonomy work.

At a glance

Abilityevents/list-event-categories
ToolsetThe Events Calendar — toolset/events-calendar
GroupThe Events Calendar › Event Categories
RequiresThe Events Calendar, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Event categories are a standard WordPress taxonomy. Creating, renaming, nesting and deleting them is already covered by the generic taxonomy abilities, and duplicating that here would mean two ways to do the same job with different behaviour in the corners.

What the generic abilities cannot tell you is how many events are in each category. The term count WordPress keeps includes only published posts of the counted types and is maintained lazily; on an event site it routinely disagrees with reality once drafts, private events and pending submissions are in play.

So this counts events directly. Empty categories are included rather than filtered out, because “which categories is nobody using” is one of the two questions people ask here.

Input

This ability takes no input.

What comes back

NameTypeWhat it is
categoriesarrayOne entry per category: term ID, name, slug, parent, description and event count.
countintegerHow many categories exist.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Which event categories are we actually using?

It resolves to one call:

{
  "ability": "events/list-event-categories",
  "parameters": {}
}

Worth knowing

  • Use the generic taxonomy abilities to create, rename or delete categories.
  • Empty categories are listed with a count of zero rather than omitted.
  • The taxonomy is hierarchical. The parent field is there for building the tree.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading