Read custom fields
get_content_metaAccess custom post meta fields, including unregistered keys hidden from the REST API, by providing a content ID and optional key filters.
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.
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. |