Support

Account

Forum Replies Created

  • 	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.

Viewing 1 post (of 1 total)