Reputation: 2041
I have multiple fields on a field group called Membership Level Feature and which post id is 5112. Now, I want to get all the fields of this post id. I am using:
echo '<pre>';
print_r( get_fields(5112 ) );
echo '</pre>';
But getting empty :(
Please check this image:
Upvotes: 7
Views: 13261
Reputation: 929
Try this:
if (function_exists('acf_get_field_groups')) {
$acf_field_group = acf_get_field_group(5112);
$acf_fields = acf_get_fields(5112);
}
Upvotes: 8