Hello,
Is there a way to add text in a field before the value? Example: In the field ‘code’, I would like to add ‘<div>’ before and ‘</div>’ after whatever I put in that field.
Field contains coding, I would like to automatically add <div> ‘code’ </div>
Thanks,
Whenever you implement your field using the_field('filename')
you could write it inside your source code:
<?php
echo "<div>";
the_field('filename');
echo "</div>";
?>
If thats helpful?
I’m using a shortcode that I insert into the editor so it would be best if I can wrap a Div around it.
Hi @gschultz
I believe you can do it by using the “acf/format_value” hook. This page should give you more idea about it: http://www.advancedcustomfields.com/resources/acfformat_value/.
I hope this helps.