Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

get_post_custom()

3 tags 1 category

get_post_custom() — Retrieves post meta fields, based on post ID. The post meta fields are retrieved from the cache where possible, so the function is optimized to be called more than once.

Inputs: $post_id (int): Optional. Post ID. Default is the ID of the global $post.

Returns array>|false Array of post meta values keyed by meta key, or false on failure. Post meta values will always be strings, even for values which would otherwise be retrieved individually as arrays or objects via get_post_meta(). A meta key which is a numeric string is keyed by the equivalent integer, as PHP casts such array keys. An empty array is returned if the post has no post meta.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…