Support

Account

Home Forums General Issues Modify shortcode to display field label? Reply To: Modify shortcode to display field label?

  • Hi. I’m so sorry for being unclear with my question.

    In my first attempt i could get the field label to display with $field_name = “sz_employee_experience”; in the shortcode code in functions.php not in the schortcode in the text editor [acf-headline field=”sz_employee_experience”] just printed the value of the field not the field label.

    Now with your last code it works perfect! $field_object = get_field_object($field); was the thing I was after.

    Thanks a lot for being so patient and sticking by when I was so unclear.

    Regards
    Olle