Carousel Bootstrap don´t work
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();
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();
No comments:
Post a Comment