Hi,
I am trying to use the acf/render_field to add custom html to the image field.
I found that in the documentation
function action_function_name( $field ) {
echo '<p>Some extra HTML for the image field</p>';
}
add_filter( 'acf/render_field/image', 'action_function_name', 10, 1 );
is it possible to target the image field by field ID like “field_508a263b40457“
so I could inject different html on diferent image field?
Thanks
function action_function_name( $field ) {
if ($field['key'] != 'your-field-key') {
return;
}
echo '<p>Some extra HTML for the image field</p>';
}
add_filter( 'acf/render_field/image', 'action_function_name', 10, 1 );