Display custom field on page

<!-- Custom Fields AJN -->

<?php

$my_custom_field = get_post_meta($post->ID, 'myCustomFieldName', true);

if ($my_custom_field == '') {

//Empty Field - Do not display
}

else {
echo '<p><strong>Heading for your post: </strong><br />' .
$my_custom_field . '</p>';
}

?><!-- End Custom Fields -->

0 Comments

You must be logged in to post a comment.