Read custom fields
get_content_metaRetrieve custom field values for a WordPress content item, including hidden meta keys not exposed by the REST API. Specify keys by name to prevent truncation of long values.
Instructions
Read the custom fields (post meta) on a content item, including keys that are not registered with show_in_rest and therefore invisible to get_content. Needs the companion plugin to see unregistered keys. Values over 20,000 characters are truncated unless the key is requested by name in keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Content ID. | |
| keys | No | Only these meta keys. Omit for everything. | |
| 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_protected | No | Include underscore-prefixed internal keys, which plugins use for their own state. |