• Resolved 10rous

    (@10rous)


    hi there
    I need to display an image from a custom field but Ican’t get it to work

    it should be like this?

    <ul>
    <?php while(has_sub_field('fotos_platos', 'option')): ?>
    <li>
    <?php $my_image = wp_get_attachment_image_src(get_sub_field('foto_plato')); ?>
    <img class="foto" src="<?php echo $my_image[0]; ?>"/>
    </li>
    <?php endwhile; ?>
    </ul>

    http://wordpress.org/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
  • Thread Starter 10rous

    (@10rous)

    solved, checking the image url option in custom field return option

    <ul>
    		<?php while(has_sub_field('fotos', 'option')): ?>
    		<li><img class="foto" src="<?php the_sub_field('foto') ?>"/></li>
    		<?php endwhile; ?>
    </ul>

Viewing 1 replies (of 1 total)
  • The topic ‘display repeater custom field image’ is closed to new replies.