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

Start free trial

GeoDirectory Assign Directory Page

geodirectory/assign-directory-page points a GeoDirectory role at a different WordPress page.

It is what makes a page you have built the live one for that role.

At a glance

Abilitygeodirectory/assign-directory-page
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Directory & Pages
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Pro 0.9.16 and later

How it works

Building a replacement directory page and assigning it are two separate jobs, and only the second one changes what visitors see. A beautifully built search page that has not been assigned is a page nobody reaches.

The page must exist and not be trashed. Pointing a role at a trashed page produces a role with no working page, which on the Details role means every listing 404s.

The per-type override is available for add, details, archive and archive_item — the roles that genuinely differ between directories. Search and Location are site-wide only.

An override beats the site-wide value, so setting one on a site that already has a site-wide page changes behaviour for that type only. That is usually the intent and it is worth being deliberate about.

Idempotent.

Input

NameTypeRequiredWhat it is
rolestringYesWhich directory role to re-point.
page_idintegerYesThe page to assign. Must exist and not be trashed.
post_typestringNoSet a per-listing-type override instead of the site-wide value. Valid for add, details, archive and archive_item only.

What comes back

NameTypeWhat it is
rolestringThe role changed.
page_idintegerThe page now assigned.
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:

Make our new search page the live one.

It resolves to one call:

{
  "ability": "geodirectory/assign-directory-page",
  "parameters": {
    "role": "search",
    "page_id": 214
  }
}

Worth knowing

  • Building a page and assigning it are separate steps.
  • A trashed page assigned to Details makes every listing 404.
  • Overrides apply to add, details, archive and archive item only.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading