如何在wordpress中集成bootstrap-carousel

时间:2015-07-12 13:32:04

标签: jquery wordpress twitter-bootstrap

我想在我的WordPress网站中集成bootstrap-carousel。我做了

                 <div class="carousel-inner">
                <? $carousel_posts = get_posts('category=12&showposts=3');
                    foreach ($carousel_posts as $post) :
                    setup_postdata($post);
                    ?>

                   <div class="item">
                     <div class="carousel-caption">
                       <h3 class="hidden-xs"><?php the_title(); ?></h3>
                       <p class="hidden-xs"><?php the_content(); ?></p>
                     </div>
                     <?php the_post_thumbnail('full');?>

                   </div>
                 <?php endforeach; ?>
                 </div>

                 <a class="carousel-control left" href="#myCarousel" data-slide="prev">
                   <span class="glyphicon glyphicon-chevron-left"></span>
                 </a>

                 <a class="carousel-control right" href="#myCarousel" data-slide="next">
                   <span class="glyphicon glyphicon-chevron-right"></span>
                 </a>
               </div>`

但旋转木马不起作用。显示帖子的内容和标题,但图片没有!为什么呢?

0 个答案:

没有答案