Home › Forums › Front-end Issues › cant see the fields on the front › Reply To: cant see the fields on the front
hi and thanks for your reply..
i solved the problem, but when i use texampny fiels or select i get display “Array”, how can i fixed it please ?
this is my code:
<?php
$fields = get_fields();
if( $fields ): ?>
<div class=”fields_name”>
<?php foreach( $fields as $name => $value ): ?>
<?php if ($value != ”){ ?>
<?php $string = $name;
$result = preg_replace(‘/_/’,’ ‘, $string);?>
<p><b><?php echo “<i style=’color:black;padding-left:10px;’ class=’fas fa-check-square’></i><span class=’name_lable’>” .$result; ?>:</span></b> <?php echo “<span class=’name_value’>” .$value; ?></span></p>
<?php }?>
<?php endforeach; ?>
</div>
<?php endif; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.