Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I can´t do work the carousel in the theme "The-Bootstrap"

The items appears all in the same time, I think the javascript it´s not calling correctly.

This my code.

get_header();

?>

<div class="container">
    <!-- Example row of columns -->
    <div class="row">
        <div class="span8 offset2">
            <div id="myCarousel" class="carousel slide">
                <!-- Carousel items -->
                <div class="carousel-inner">
                    <?php
                        $destaques = new wp_query (array(
                        'post_type' => 'projeto_post',
                        'posts_per_page' => 1,
                        'meta_query' => array(
                                array(
                                    'key' => 'cdi_destaque',
                                    'value' => 1,
                                )
                            )
                        ));
                    while ($destaques->have_posts()) {
                        $destaques->the_post();
                        ?>
                        <div class='item active'>
                            <?php the_post_thumbnail('large'); ?>
                            <div class="carousel-caption">
                                <h4><?php the_title();?></h4>
                                <p><?php the_excerpt();?></p>
                            </div>
                        </div>
                    <?php
                    }
                    wp_reset_postdata();
                    ?>
                    <!-- insere outros -->
                    <?php
                    $destaques2 = new wp_query (array(
                        'post_type' => 'projeto_post',
                        'posts_per_page' => 5,
                        'offset' => 1,
                        'meta_query' => array(
                                array(
                                    'key' => 'cdi_destaque',
                                    'value' => 1,
                                )
                            )
                    ));
                while ($destaques2->have_posts()) {
                    $destaques2->the_post();
                    ?>
                    <div class='item active'>
                        <?php the_post_thumbnail('large'); ?>
                        <div class="carousel-caption">
                            <h4><?php the_title();?></h4>
                            <p><?php the_excerpt();?></p>
                        </div>
                    </div>
                <?php
                }
                wp_reset_postdata();
                ?>
            </div> <!-- end carousel item -->
                <!-- Carousel nav -->
                <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
                <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
            </div>
        </div>
    </div>
</div>
</div>

<?php get_footer();
share|improve this question
    
Are you having any errors in your javascript console? –  RRikesh Jun 7 '13 at 6:13
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.