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

Start free trial

GeoDirectory List Sort Options

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

Abilitygeodirectory/list-sort-options
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Tabs, Sorting & Blocks
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
post_typestringNoListing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values.
active_onlybooleanNoOnly options currently shown to visitors.

What comes back

NameTypeWhat it is
optionsarrayEach option with its ID, field, direction, label, active flag and default flag.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading