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
| Ability | geodirectory/assign-directory-page |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Directory & Pages |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
role | string | Yes | Which directory role to re-point. |
page_id | integer | Yes | The page to assign. Must exist and not be trashed. |
post_type | string | No | Set a per-listing-type override instead of the site-wide value. Valid for add, details, archive and archive_item only. |
What comes back
| Name | Type | What it is |
|---|---|---|
role | string | The role changed. |
page_id | integer | The page now assigned. |
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:
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
- GeoDirectory List Directory Pages — read the current assignments
- GeoDirectory List Display Blocks — build the page first
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category