Home Forums Add-ons Repeater Field Bootstrap Image carousel


Bootstrap Image carousel

  • Hello
    Im trying to do a simple bootstrap 4 image carousel.
    If I just paste the example code from
    everything works just fine. But when I replace the example img tag to my image tag the my repeater field outputs, nothing shows.

    And if I remove the <div class=”carousel-item”> tag the images appear on the page, but not as a alide item. So it is nothing wrong with my image tag..

    I can’t figure out why it is not working…

    The URL to my page is

    Here is the code

    <?php if( have_rows(‘slides’) ): ?>
    <div id=”demo” class=”carousel slide” data-ride=”carousel”>
    <div class=”carousel-inner”>

    <?php while( have_rows(‘slides’) ): the_row();

    $image = get_sub_field(‘image’);


    <div class=”carousel-item”>

    ” alt=”<?php //echo $image[‘alt’] ?>” />

    <p class=”caption”><?php the_sub_field(‘caption’); ?></p>


    <?php endwhile; ?>

    <?php endif; ?>

  • The forum has eaten your code because you did not use code tags. Please re-post your code using code tags.

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

The topic ‘Bootstrap Image carousel’ is closed to new replies.