Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jspike

    (@jspike)

    Basically, if you can show me an example of using your code with Bootstrap’s carousel example, that would be awesome:

    http://getbootstrap.com/javascript/#carousel

    Thread Starter jspike

    (@jspike)

    Passing it on:

    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      </ol>
    
      <!-- Wrapper for slides -->
      <div class="carousel-inner" role="listbox">
        <div class="item active">
         	<img src="<?php echo $feat_image; ?>" />
    
        </div>
        <?php
    	$galleryArray = get_post_gallery_ids($post->ID);
    foreach ($galleryArray as $id) { $img   =  wp_get_attachment_image_src( $id, 'full' ) ?>
            <div class="item">
    
        <img src="<?php echo $img[0];?>" />
            </div>
    
    <?php } ?>
    
      </div>
    
      <!-- Controls -->
      <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div>

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

The topic ‘For developers only’ is closed to new replies.