WPDev.one
Core Function
View Source on Trac ↗

get_post_custom_values()

get_post_custom_values( mixed $key = '', mixed $post_id = 0 )

Retrieves values for a custom post field.

Parameters 0 required

Name / Type Description
$key
string

Optional. Meta field key. Default empty.

$post_id
int

Optional. Post ID. Default is the ID of the global `$post`.

Return Value

((array)
| null) Meta field values.

Function Information

Since Version
1.2.0
Source File
wp-includes/post.php
Advertisement