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
| Ability | geodirectory/delete-sort-option |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Tabs, Sorting & Blocks |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Destructive — requires confirm_name, and confirm_default_removal for the default option. |
| 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
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
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | Sort option ID, from geodirectory/list-sort-options. Each direction has its own ID. |
confirm_name | string | Yes | Must match the option’s current frontend_title exactly as it is on this site. The guardrail against deleting by ID alone. |
post_type | string | No | Listing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values. |
confirm_default_removal | boolean | When removing the default | Required when deleting the option currently marked as the default sort. |
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 option removed. |
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:
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
- GeoDirectory Manage Sort Option — set a new default first
- GeoDirectory List Sort Options — find the right ID
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category