I’m looking to create a radio box field for layout, however I would love to replace the text with the an image but have had little luck.
Hi @GnuandYou,
Have you tried using the acf/load_field
filter to alter the choices for the radio button? Its pretty simple, try this:
add_filter('acf/load_field/name=my_radio)button', 'my_acf_load_field');
function my_acf_load_field( $field ) {
$field['choices'] = array(
'image_1' => '<img src=".../image_1.jpg" alt="image" />',
'image_2' => '<img src=".../image_2.jpg" alt="image" />'
...
);
return $field;
}
For more information about this, have a look at: acf/load_field
Ah my mistake for some reason I thought you couldn’t include html as part of the editor. Yea this works great Thanks!