Home › Forums › ACF PRO › Category images › Reply To: Category images
Hi John,
Thanks for your suggestion, but it isn’t working unfortunately.
This is my current code.
<?php if (get_row_layout() === 'diensten'): ?>
<div id="diensten-thumbs">
<?php foreach ($term_array as $row): ?>
<div class="dienst" style="background-image: url(<?php the_sub_field('image', 'category_'.$row->term_id) ?>)">
<h3><?php echo $row->name ?></h3>
</div>
<?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.