Hi,
I´m displaying some fields from ACF, and I got into a problem
I need to display this:
<?php // lugar_de_atencion ( value )
$lugar_de_atencion_array = get_field( 'lugar_de_atencion' );
if ( $lugar_de_atencion_array ):
foreach ( $lugar_de_atencion_array as $lugar_de_atencion_item ):
echo $lugar_de_atencion_item;
endforeach;
endif; ?>
Well… what I did was, to create a div, and instead of adding a custom PHP code (like I do for single elemens display) I just right-click on the div, and do “Edit Code”, and inserted the PHP code.
It worked… but I wanna know if there is any proper way to do it, to insert a code like that, so I can format it adding paragraphs and h1, and other stuff inside the foreach, and properly see it in the pinegrow tree?
Please, If you take a look at the screenshot, I can show you what I did (put the phocode doing right-click and adding it) I wanna add that I tried to add it doing the “preview php-code” but i was unable to edit it.