Get content by ID
get_contentRetrieve any WordPress content item by ID, returning the raw body exactly as stored — read this before making targeted edits.
Instructions
Fetch one item of any content type by ID, including the raw content body exactly as stored — which is what you must read before making targeted edits, since the block editor stores markup with HTML comment delimiters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The content ID. | |
| raw | No | Return the raw stored content rather than the rendered output. Keep true for editing; set false to see what visitors get. | |
| type | No | Content type slug. Wrong type gives a 404 — use find_content_by_url or get_content_by_slug if unsure. | post |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| include_meta | No | Include registered custom fields. | |
| max_content_chars | No | Truncate very long bodies at this many characters. |