2016-07-21 18 views
0

Ich schrieb ein bisschen PHP mit Bootstrap KarussellBootstrap Karussell nicht funktioniert (php + Wordpress + Bootstrap)

<?php if(magic_get_attachment()): 
     $attachments = magic_get_attachment(7); 
     //var_dump($attachments); 
    ?> 

     <div id="post-gallery-<?php the_ID(); ?>" class="carousel slide" data-ride="carousel">   

      <div class="carousel-inner" role="listbox"> 

       <?php 
        $i = 0; 
        foreach($attachments as $attachment): 
        $active = ($i == 0 ? ' active' : ''); 
       ?> 

        <div class="item<?php echo $active; ?> background-image standard-featured" style="background-image: url(<?php echo wp_get_attachment_url($attachment->ID); ?>);"></div> 

       <?php $i++; endforeach; ?> 


      </div><!-- .carousel-inner --> 

     </div><!-- .carousel --> 

    <?php endif; ?> 

Als ich in Chrome inspizieren, kann ich alle Bilder sehen haben

gespeichert worden, aber es scheint das Karussell rutscht nicht. stimmt etwas nicht mit meinem Code? Thx.

Antwort

0

Problem gelöst.

bootstrap Karussell kann nicht mit jQuery-Version höher als 3.