Reference

Read a post or page

Use the current WordPress Core get-post Ability with an identifier from the same website.

Discover morawp/wordpress-core-get-post on the target website, then call describe_ability for its current contract. It is an ordinary read and runs through execute_read_ability.

Choose the item first

List posts or pages on the same website and select the returned identifier. A WordPress page is a post type, so the get-post Ability can read its native record too.

Parameters

In MoraWP Plugin 0.2.44, the input accepts a positive integer in post_id or its id alias. At least one is required; if both are supplied they must agree. Other properties are not accepted by this schema.

Example Ability parameters, after discovery returns post ID 5:

JSON
{
  "post_id": 5
}

5 is an example, not a reusable identifier for another website. Put these arguments inside the executor's parameters; provide the website reference and namespaced Ability ID in its outer arguments.

What comes back

The result includes the native post record. Its content may be HTML or builder data. Authorized reads can include metadata and private fields; Read only is not a redaction mode.

Check the returned identifier and title against WordPress. The read should not modify the page.

If the item is missing

A nonexistent identifier can produce a WordPress post-not-found failure. Return to the same website's current list and choose an existing item. Do not guess a sequence of IDs or copy one from a different website.

Parameter contract checked against MoraWP Plugin 0.2.44. Discover the current website contract before execution.

See Inputs and outputs and WordPress tool failed.

MoraWP documentation