Home Forums Add-ons Repeater Field Issues with repeater and image urls


Issues with repeater and image urls

  • Hi everyone,

    I’m trying to get img urls to simply display as a test using repeater as a first stage of getting them turned into a carousel. But I’m having trouble getting the URLS to display.

    I’m created a repeater field called “slider” and a sub-field called “slide” which is an image field that has been set to return the image URL.

    Here’s my code. Any ideas what I’m doing wrong? Also does all of this code need to be contained in your standard wp post loop too?

    <div class="section">
        <div class="container">
            <div class="row">
            <?php if(have_rows('slider')): while(have_rows('slider')) : the_row(); ?>
                <p><?php the_sub_field('slide'); ?></p>
            <? endwhile; endif; ?>
  • Guys, thanks so much for your assistance.

    I’ve realised what I did, I created the slider a repeater field in the options page so that’s why it wasn’t working!

    So if I called the_sub_field(‘options’, ‘slide’); it would have worked!


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

The topic ‘Issues with repeater and image urls’ is closed to new replies.