Output the label of an ACF field

You can output the label of an Advanced Custom Field: ACF field by using the get_field_object() function which stores an array of data about the custom field.

/*
*  Output Label from ACF field
*/

$field_name = "acf_field_name_here";
$field = get_field_object($field_name);

echo '<h3>'. $field['label'] . '</h3>';

Leave a Comment





%d bloggers like this: