Home Forums General Issues Orbit & Gallery


Orbit & Gallery

  • Trying to use the orbit slider from foundation

    div class="orbit" role="region" aria-label="Favorite Space Pictures" data-orbit>
                            $images = get_field('gallery');
                        if( $images ): ?>
                            <div class="orbit-wrapper">
                                <div class="orbit-controls">
                                    <button class="orbit-previous"><span class="show-for-sr">Previous Slide</span>◀︎</button>
                                    <button class="orbit-next"><span class="show-for-sr">Next Slide</span>▶︎</button>
                                <ul class="orbit-container">
                                    <?php foreach( $images as $image ): ?>
                                    <li class="orbit-slide">
                                        <figure class="orbit-figure">
                                            <img class="orbit-image" src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>">
                                            <figcaption class="orbit-caption">Lets Rocket!</figcaption>
                                    <?php endforeach; ?>
                            <nav class="orbit-bullets">
                                <button data-slide="0"><span class="show-for-sr">First slide details.</span><span class="show-for-sr">Current Slide</span></button>
                                <button data-slide="1"><span class="show-for-sr">Second slide details.</span></button>
                                <button data-slide="2"><span class="show-for-sr">Third slide details.</span></button>
                                <button data-slide="3"><span class="show-for-sr">Fourth slide details.</span></button>
                            <?php endif; ?>

    The images show, but on the 2nd image it still shows the first. Can’t work out where i am going wrong..

Viewing 1 post (of 1 total)

The topic ‘Orbit & Gallery’ is closed to new replies.