WPDev.one
Core Function
View Source on Trac ↗

get_post_custom()

get_post_custom( mixed $post_id = 0 )

Retrieves post meta fields, based on post ID.

Parameters 0 required

Name / Type Description
$post_id
int

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

Return Value

(mixed)
mixed An array of values. False for an invalid `$post_id` (non-numeric, zero, or negative value). An empty string if a valid but non-existing post ID is passed.

Function Information

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