Support

Account

Home Forums Add-ons Repeater Field ACF 5.12.1 Repeater not working

Solved

ACF 5.12.1 Repeater not working

  • I don’t know what’s wrong with this code. I made a test site with a copy of my old site and used the same code but it’s not showing anything. it won’t even go into the if statement (I had echo’d every step to troubleshoot). Not sure if it’s settings in WP or this code. Please help?

    <?php
    // Check rows exists.
    if( have_rows(‘slider’) ): ?>
    <div class=”carousel-inner”>
    <?php // Loop through rows.
    while( have_rows(‘slider’) ) : the_row();

    // Load sub field value.
    $slider_photo = get_sub_field(‘slider_photo’);
    $slider_photo_cropped = get_sub_field(‘slider_photo_cropped’);
    // Do something…

    echo wp_get_attachment_image( $slider_photo, ‘url’ );
    echo wp_get_attachment_image( $slider_photo_cropped, ‘url’ );

    // End loop.
    endwhile;

    // No value.
    else :
    // Do something… ?>
    </div>
    <?php endif; ?>

  • This is not solved. The image won’t show up. Can’t delete it. argh!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.