Home › Forums › Bug Reports › Image in repeater issue › Reply To: Image in repeater issue
if (have_rows("sidebar_bovenste_banners", $page_id)) {
?>
<ul id="side-bar-top" class="banners-slider">
<?php
while (have_rows("sidebar_bovenste_banners", $page_id)) { the_row();
$image = get_sub_field("banner");
$link = get_sub_field("link");
?>
<li>
<a href="<?php echo $link ?>" target="_blank">
<img src="<?php echo $image; ?>" alt="">
</a>
</li>
<?php
}
?>
</ul>
<?php } ?>
This would be the working solution, outputing the image URL instead of the array. Otherwhise I’d echo the image as $image[‘sizes’][‘somesize’] or print_r($image) to see the array. But it will return some random int.
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.