• Hi all,

    I build a Template using Bootstrap which fully works outside WordPress but now I want to use this template in WordPress and it´s not working.
    So far I added the Twitter Bootstrap CSS plugin into my page and actived all functions, so the grid system, navbar etc is working with no problems.
    The carousel on the other hand itsn´t working, first of all when I try to create a sidebar-carousel.php, I put the carousel that I did there and that´s what I get
    here

    So I tried to put all the code in my header.php file and that´s my current website
    As you can see, the image on slide 1 appears, and if I activate subtitles it´ll also work, but I don´t have arrows and it doesn´t goes to slide 2 at all.

    THe following lines has the carousel code that I´m using and the final scripts on index.php. If anyone here has any idea of how to fix that it´ll be grand.

    <!-- Carousel
        ================================================== -->
        <div id="myCarousel" class="carousel slide" data-ride="carousel">
          <!-- Indicators -->
          <ol class="carousel-indicators">
            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#myCarousel2" data-slide-to="1"></li>
            <li data-target="#myCarousel3" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner" role="listbox">
            <div class="item active">
              <img src="<?php bloginfo('template_directory'); ?>/imagens/manta.jpg" alt="Logo" />
              <div class="container">
                <div class="carousel-caption">
                 <!-- <h1>Example headline.</h1>
                  <p>Note: If you're viewing this page via a <code>file://</code> URL, the "next" and "previous" Glyphicon buttons on the left and right might not load/display properly due to web browser security rules.</p>
                  <p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p>-->
                </div>
              </div>
            </div>
            <div class="item">
              <img src="imagens/vermiculita.jpg" alt="Second slide">
              <!--<div class="container">
                <div class="carousel-caption">
                  <h1>Another example headline.</h1>
                  <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                  <p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
                </div>
              </div>
            </div> <!--
            <div class="item">
              <img src="" alt="Third slide">
              <div class="container">
                <div class="carousel-caption">
                  <h1>One more for good measure.</h1>
                  <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                  <p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p>
                </div>
              </div>
            </div>
          </div> -->
          <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div><!-- /.carousel -->

    And the scripts at the end of index.php

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="../../dist/js/bootstrap.min.js"></script>
        <script src="../../assets/js/docs.min.js"></script>
        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
        <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
        $('.carousel').carousel({
      		interval: 1000
      	})
    });
    </script>
    <?php get_footer(); ?>
  • The topic ‘Problems to migrate a Bootstrap template to WordPress format’ is closed to new replies.