Hello
I am trying to show a group of fields with their labels, but I am getting the field names instead. Also I would love to be able to style the label and the value separately, which means adding classes, unfortunately this is also outside my competence.
And as a last thing, this spits out the field name and value on separate lines, which I also would like to prevent.
Very thankful for any advice, this is the code I am using:
<?php
$fields = get_fields();
if( $fields ): ?>
<ul>
<?php foreach( $fields as $label => $value ): ?>
<li><b><?php echo $label; ?></b> <?php echo $value; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>