Read a post or page
wp_get_postRetrieve one post, page or entry of any post type by ID, including raw content, public custom fields and assigned taxonomy terms. Use it to read a single item for editing or analysis.
Instructions
Get one post, page or entry of any post type by id: the fields of wp_list_posts plus the raw content, public custom fields (meta) and the assigned term names per taxonomy. For a post built with a page builder or block library, built_with names the builder, how the page is stored and the tools that change it (write_via); where post_content is not what the site shows, its note says so, and wp_get_builder_layout returns the page's elements. A revision_id from wp_list_revisions returns that revision. Needs edit_posts and the right to read the post; a password-protected post or a revision needs the right to edit it (for a revision: its post). An unknown id returns a not-found error. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Post id, as wp_list_posts or wp_search return it. | |
| include_meta | No | true includes the public custom fields the account may edit (keys starting with "_" and credential-like keys are left out). Default true. |