Hi there,
I’m trying to add in up to three repeater rows in a template.
The repeater field is called – sponsor_logo and the sub-fields are 1) sponsor_logos (image) and 2) sponsor_link (URL).
I have the following code running in my template:
<?php if( have_rows('sponsor_logo') ): ?>
<?php while ( have_rows('sponsor_logo') ) : the_row(); ?>
<a href="<?php the_sub_field('sponsor_link'); ?>" target="_new">
<img src="<?php the_sub_field('sponsor_logos'); ?>" alt="sponsor-image" class="sponsor-image" />
</a>
<?php endwhile; ?>
<?php endif; ?>
I can get all to display, apart from the image itself – the paths seem to not be registering correctly – a Firebug inspection of the broken image suggests an attempted path of:
<img src="392, 392, dummy-logo1, dummy-logo1.jpg, http://mysite/wp-content/uploads/2015/08/dummy-logo1.jpg, , 1, , , dummy-logo1, 2015-08-13 10:17:46, 2015-08-13 10:17:46, image/jpeg, image, http://mysite/wp-includes/images/media/default.png, 300, 300, Array" alt="sponsor-image" class="sponsor-image">
Any ideas? Bit new to WordPress / PHP so hoping it’s something obvious!
Thanks