• Hi, I’m trying to create a carousel with images and I can not find the solution. Look on the internet but found nothing.
    This is the code I’m using.

    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                                <?php
                                    $exhibition_images  = get_post_meta( $post->ID, '_exhibition_images', true );
                                    $count = 0;
                                    if( is_array( $exhibition_images ) )
                                    {
                                        ?>
                                            <ol class="carousel-indicators">
                                                    <li data-target="#carousel-example-generic" data-slide-to="<?php echo $count;?>"></li>
                                            </ol>
                                    <div class="carousel-inner">
                                    <?php
                                        foreach( $exhibition_images as $image_id )
                                        {
                                                                ?>
    
                                                                    <div class="item">
                                                                        <?php echo wp_get_attachment_image( $image_id, 'full' );?>
                                                                    </div>
    
                                                                <?php
                                            $count++;
                                        }
                                    }
                                        ?>                    </div>
    
                                    <!-- Controls -->
                                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                                        <span class="glyphicon glyphicon-chevron-left"></span>
                                    </a>
                                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                                        <span class="glyphicon glyphicon-chevron-right"></span>
                                    </a>
                                </div>

    https://www.ads-software.com/plugins/exhibition/

  • The topic ‘Bootstrap Carousel’ is closed to new replies.