snippets/list-locations lists every auto-insert location WPCode recognises, with a plain description of when each one fires.
Read it before snippets/set-location, because an unrecognised location is refused rather than stored.
At a glance
| Ability | snippets/list-locations |
| Toolset | WPCode — toolset/wpcode |
| Group | WPCode › Placement |
| Requires | WPCode, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The location strings are WPCode’s own identifiers, not free text. Site header, site footer, everywhere, admin only, before post content, after post content — each corresponds to a specific hook firing at a specific point, and the difference between two that sound alike is usually whether the loop has run.
Getting one wrong used to be a silent failure: WPCode stores a location it does not recognise happily enough, and then never inserts the snippet anywhere. No error, no warning, a snippet that is active and cached and simply never appears.
This listing is the fix for that at the source — the accepted values, with their meanings, before you write one.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
locations | array | One entry per location: its identifier and what it means. |
count | integer | How many locations are available. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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:
Where can a snippet be inserted automatically?
It resolves to one call:
{
"ability": "snippets/list-locations",
"parameters": {}
}Worth knowing
- The identifiers are WPCode’s, not free text.
- An unrecognised location is refused by
snippets/set-location, by name. - Locations around post content depend on the theme rendering content through the standard filters.
Related abilities
- Set Snippet Location — apply one of these
- Set Snippet Conditional Logic — narrow it further
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category