Okay so thats how you do it. http://www.advancedcustomfields.com/resources/functions/get_field_objects/
This worked for me to get fields’ labels and values based on the postid, but
Still not sure how to get the groupid from the post/page id.
Good Luck!
Actually I wonder if this is how we get the fields lables/values with post id, http://www.advancedcustomfields.com/resources/functions/get_field_objects/ ??? I use that but got bool(false)? Whats up?
I’m looking for this exact same thing. Currently I’m doing something like this, `<?php
//or insert the ID of your fields Group.
$groupID=’2480′;
$custom_field_keys = get_post_custom_keys($groupID);
$items = count($custom_field_keys);
foreach ( $custom_field_keys as $key => $fieldkey )
{
if (stristr($fieldkey,’field_’))
{
//echo $key . ” => ” . $fieldkey . “<br />”;
//echo $field[‘label’] . ‘: ‘ . $field[‘value’];
//echo $fieldkey . “<br />”;
$field = get_field_object($fieldkey, $groupID);
echo ‘<span class=”h4″>’ . $field[‘label’] . ‘</span><br /><span class=”sans”>’ . $field[‘value’]. ‘</span></p>’;
}
}
?>`
But would love to know how to get it from the post/page id.