Created
October 30, 2017 19:08
-
-
Save MoisesTedeschi/a4bbc8596cb52f32ae0fd92291bea81c to your computer and use it in GitHub Desktop.
lopp_acf_clientes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Slide Carossel--> | |
<div class="carousel slide media-carousel" id="media"> | |
<?php | |
$arg_clientes = array( | |
'post_type' => 'cadastro_clientes', | |
'posts_per_page' => 4, | |
); | |
?> | |
<?php $novo_clientes = new WP_Query($arg_clientes); ?> | |
<!--Carrossel Inner--> | |
<div class="carousel-inner"> | |
<?php if($novo_clientes->have_post() ): ?> | |
<?php $cont = 1; ?> | |
<?php while ($novo_clientes->have_post() ) : ?> | |
<?php if($cont == 1): ?> | |
<?php $classe = 'item active'; ?> | |
<?php else: $classe = 'item'; ?> | |
<?php endif; ?> | |
<div class="<?php echo $classe; ?>"> | |
<!--Linha Exibição--> | |
<div class="row"> | |
<div class="col-md-3"> | |
<?php $novo_clientes->the_row(); ?> | |
<a href="<?php the_sub_field('url_cliente'); ?>"> | |
<img src="<?php the_sub_field('logotipo'); ?>"> | |
</a> | |
</div> | |
</div> | |
<!--Linha Exibição--> | |
</div> | |
<?php $cont = ++$cont; ?> | |
<?php endwhile; ?> | |
<?php wp_reset_postdata(); ?> | |
<?php else : echo "Não há cliente cadastrado!"; ?> | |
<?php endif; ?> | |
</div> | |
<!--Carrossel Inner--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment