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

Start free trial

GeoDirectory Delete Sort Option

geodirectory/delete-sort-option removes an entry from the Sort by dropdown on archive and search pages. It requires confirm_name matching the option’s current label.

No listing data is affected, and the option can be recreated.

Before you run it

Removing the option currently marked as default means archives fall back to GeoDirectory’s built-in ordering, which is rarely what the site had chosen. That case requires confirm_default_removal. Set another option as the default first if the archive order matters.

At a glance

Abilitygeodirectory/delete-sort-option
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Tabs, Sorting & Blocks
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyDestructive — requires confirm_name, and confirm_default_removal for the default option.
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

This is the mildest destructive operation in the suite: a dropdown entry, recreatable in one call, with no data behind it.

The one consequence worth guarding is the default. Archives use the default option to order results when the visitor has not chosen, and removing it drops the site back to GeoDirectory’s built-in ordering — which is usually newest first, and usually not what a directory wanted.

So set another option as the default before removing that one, or accept the fallback deliberately with confirm_default_removal.

Remember that each direction is its own record. Removing “price sorting” is two calls.

Not idempotent.

Input

NameTypeRequiredWhat it is
idintegerYesSort option ID, from geodirectory/list-sort-options. Each direction has its own ID.
confirm_namestringYesMust match the option’s current frontend_title exactly as it is on this site. The guardrail against deleting by ID alone.
post_typestringNoListing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values.
confirm_default_removalbooleanWhen removing the defaultRequired when deleting the option currently marked as the default sort.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
idintegerThe option removed.
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:

Remove the “random” sort option.

It resolves to one call:

{
  "ability": "geodirectory/delete-sort-option",
  "parameters": {
    "id": 31,
    "confirm_name": "Random"
  }
}

Worth knowing

  • No listing data is affected.
  • Removing the default drops archives to built-in ordering.
  • Each direction is a separate record and a separate call.
  • Recreatable in one call.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading