Support

Account

Home Forums Feature Requests Display Field Name while Developing

Solved

Display Field Name while Developing

  • It would be great if there was an option in ACF that would allow you to display the “field name” while creating or editing a post.

    For example, I have a custom field set on the homepage of our website. The fields are:

    Hero Image
    Heading
    Subheading
    Partners Description
    Partner Logos

    If this option was turned on, the field name would be displayed while editing the homepage. The edit post page fields would then look like this:

    Hero Image (hero_image)
    Heading (hero_heading)
    Subheading (hero_subheading)
    Partners Description (partners_description)
    Partner Logos (partner_logos_repeater)

    I already use the ACF Field Viewer plugin, but that’s only helpful on the front-end.

    Thanks!

  • Hi @jrobsd,

    Maybe you can add this code on your functions.php file?

    function action_function_name( $field ) {
    	echo $field['_name'];
    }
    add_action( 'acf/render_field', 'action_function_name', 10, 1 );

    I hope this helps.

  • James – this PERFECT. Exactly what I was hoping for.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.