Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Custom Field Value in Header WordPress


I need to pull a custom field value from the current post and place it the header for some Facebook integration im working on. I know some Open Graph plugins exist for Wordpress, but Im in need of a custom format for a certain page template.

So in the header I need to display:
<meta xmlns:og="" property="og:description" content="[CUSTOM FIELD VALUE HERE]>" />

I am using a plugin for custom field values called "Get Custom Field Values". Ive tried using <?php echo c2c_get_custom('display-date'); ?> and <?php echo get_post_meta($post->ID, 'display-date', true) ?> and neither work.

Any Help?

Answers (2)


Nilesh shiragave answers:

try this

global $post;
echo get_post_meta($post->ID, 'display-date', true)


Ehthisham tk answers:

may this help you scroll down to 9