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

Start free trial

GeoDirectory Delete Listing

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

Abilitygeodirectory/delete-listing
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Listings
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyDestructive — requires confirm_name matching the listing’s title. Trashes by default; force deletes permanently.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI 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

NameTypeRequiredWhat it is
idintegerYesListing post ID.
confirm_namestringYesMust match the listing’s current title exactly as it is on this site. The guardrail against deleting by ID alone.
post_typestringNoDerived from the listing when omitted.
forcebooleanNoFalse trashes and is recoverable. True deletes permanently and cannot be undone.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
idintegerThe listing.
deletedstringWhether it was trashed or deleted permanently.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading