Skip to content

Instantly share code, notes, and snippets.

@Apeli
Last active November 14, 2017 21:05
Show Gist options
  • Save Apeli/28ff99a22d7c4a94e00dbea36df57192 to your computer and use it in GitHub Desktop.
Save Apeli/28ff99a22d7c4a94e00dbea36df57192 to your computer and use it in GitHub Desktop.
Show Advanced Custom Fields field name on Wordpress admin on hover
//In functions.php
add_action('admin_head', 'show_acf_field_names');
function show_acf_field_names() {
echo '<style>
body:not(.post-type-acf-field-group) .acf-field:hover:before {
content: attr(data-name);
display: inline-block;
position: absolute;
background: #FFF;
padding: 0 3px;
border: 1px solid #CCC;
font-size: 9px;
right: 0;
left:auto;
z-index: 10;
height: 20px;
width: 70px;
}
</style>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment