Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $args = array( 'post_type' => 'clientes'); $loop = new WP_Query($args); ?>
- <?php $counter = 4; ?>
- <div class="container">
- <div class='row'>
- <div class='col-md-12'>
- <div class="carousel slide media-carousel" id="media">
- <div class="carousel slide media-carousel" id="eventCarousel" data-interval="0">
- <div class="carousel-inner onebyone-carosel">
- <h2 class="text-center">Nossos clientes</h2>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <div class="item <?php if($counter == 4){echo "active"; } ?>">
- <div class="col-md-3">
- <h4 class="text-center">
- <?php the_title(); ?>
- </h4>
- <a href="<?php echo do_shortcode(get_post_meta($post->ID,'site_cliente', true )); ?>" target="_blank">
- <?php echo odin_thumbnail(420,420, 'Clientes', true, 'cliente' ); ?>
- </a>
- <div class="text-center">
- <a href="<?php echo do_shortcode(get_post_meta($post->ID,'facebook_cliente', true )); ?>" target="_blank"></a>
- </div>
- </div>
- </div>
- <?php $counter++ ?>
- <?php endwhile; ?>
- </div>
- <a data-slide="prev" href="#eventCarousel" class="left carousel-control">‹</a>
- <a data-slide="next" href="#eventCarousel" class="right carousel-control">›</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function () {
- $('#productsCarouselXs').carousel({
- interval: 4000
- })
- $('#eventCarousel .item').each(function () {
- var next = $(this).next();
- if (!next.length) {
- next = $(this).siblings(':first');
- }
- next.children(':first-child').clone().appendTo($(this));
- if (next.next().length > 0) {
- next.next().children(':first-child').clone().appendTo($(this));
- }
- else {
- $(this).siblings(':first').children(':first-child').clone().appendTo($(this));
- }
- if (next.next().next().length > 0) {
- next.next().next().children(':first-child').clone().appendTo($(this));
- }
- else {
- $(this).siblings(':first').children(':first-child').clone().appendTo($(this));
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement