get_post_meta() | Function | WordPress Developer Resources

PHOTO EMBED

Wed Jul 20 2022 13:03:07 GMT+0000 (Coordinated Universal Time)

Saved by @kalehm

get_post_meta( int $post_id, string $key = '', bool $single = false )
Retrieves a post meta field for the given post ID.

Parameters
$post_id
(int) (Required) Post ID.

$key
(string) (Optional) The meta key to retrieve. By default, returns data for all keys.

Default value: ''

$single
(bool) (Optional) Whether to return a single value. This parameter has no effect if $key is not specified.

Default value: false

content_copyCOPY

https://developer.wordpress.org/reference/functions/get_post_meta/