geodirectory/delete-listing trashes a listing, or permanently deletes it with force.
It requires confirm_name matching the listing’s current title.
Before you run it
Trashing is recoverable. force: true is not: it bypasses the trash and also removes the listing’s custom-field row and its images, which are stored outside the post. A directory listing is frequently somebody’s business record, entered by them, and there is no copy anywhere else.
At a glance
| Ability | geodirectory/delete-listing |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Listings |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Destructive — requires confirm_name matching the listing’s title. Trashes by default; force deletes permanently. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
A boolean confirmation proves somebody meant to delete something. A name proves they meant to delete this.
That distinction matters when the caller is working from an ID it was handed — a search result, a previous response — and the ID may not be what anybody pictured. Requiring the title closes the gap between “delete listing 812” and “delete The Avon Kitchen”.
The name must match what is on the site now, which also catches the case where the listing changed between reading and writing.
Trashing is the default and is recoverable through the normal WordPress trash.
Permanent deletion removes more than the post. GeoDirectory keeps each listing’s custom fields in its own table row and its images separately, and both go — which is correct and is more than a WordPress post deletion would take.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | Listing post ID. |
confirm_name | string | Yes | Must match the listing’s current title exactly as it is on this site. The guardrail against deleting by ID alone. |
post_type | string | No | Derived from the listing when omitted. |
force | boolean | No | False trashes and is recoverable. True deletes permanently and cannot be undone. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
id | integer | The listing. |
deleted | string | Whether it was trashed or deleted permanently. |
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:
Delete the closed restaurant listing.
It resolves to one call:
{
"ability": "geodirectory/delete-listing",
"parameters": {
"id": 812,
"confirm_name": "The Avon Kitchen"
}
}Worth knowing
- The name must match the current title exactly.
- Permanent deletion also removes the custom-field row and the images.
- Trashing is the default and is recoverable.
- A listing is often somebody’s own business record.
Related abilities
- GeoDirectory Get Listing — confirm which listing this is
- GeoDirectory Update Listing — unpublish instead
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category