geodirectory/list-sort-options returns the Sort by dropdown entries for a listing type, with their IDs, sort direction, and which one is the default.
Each direction is its own record — which is the thing people get wrong.
At a glance
| Ability | geodirectory/list-sort-options |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Tabs, Sorting & Blocks |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Sorting by price ascending and sorting by price descending are two separate sort options with two separate IDs, not one option with a togglable direction.
So making a field sortable both ways means creating two records, and removing “price sorting” means deleting two.
That also means an option can exist in one direction only, which is a perfectly reasonable configuration — newest first without oldest first — and looks like a missing record if you expect pairs.
The default flag marks the option archives use when the visitor has not chosen. Only one option holds it, and setting it on another moves it.
The active_only filter narrows to what visitors currently see, as against what is configured.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_type | string | No | Listing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values. |
active_only | boolean | No | Only options currently shown to visitors. |
What comes back
| Name | Type | What it is |
|---|---|---|
options | array | Each option with its ID, field, direction, label, active flag and default flag. |
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:
What sort options do our archives offer?
It resolves to one call:
{
"ability": "geodirectory/list-sort-options",
"parameters": {}
}Worth knowing
- Ascending and descending are separate records with separate IDs.
- An option existing in one direction only is normal.
- Only one option carries the default flag.
- Read-only.
Related abilities
- GeoDirectory Manage Sort Option — add or change one
- GeoDirectory Delete Sort Option — remove one
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category