Read custom field values of a post – WordPress

The below given code will list all the values added to the given fields

<?php

$custom_fields = get_post_custom(POST_ID);

$fieldsValue = $custom_fields[‘FIELD’];

foreach ( $fieldsValue as $key => $value )

echo  $value . “<br />”;

?>

 

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *