I create an option page but when I try to display the data, just can see that info and not any other HTML code.
Here the example:
<?php if( the_field('phone', 'option') ): ?>
<li><?php the_field( 'phone' ); ?></li>
<?php endif; ?>
The result is just the phone (ex: +1 2345 6789) but not the <li></li>
Any idea?
Thank you very much
Rod
The field echos the field, the first on is echoing the field and the second is echoing nothing because it’s missing the ‘option’ argument.
I’m guessing that with you’re probably seeing is
+1 2345 6789
<li></li>
try
<?php if( get_field('phone', 'option') ): ?>
<li><?php the_field( 'phone', 'option' ); ?></li>
<?php endif; ?>
Thank you John, work perfect!