Deligraph-V3/templates/template-clients.php
2024-09-24 15:38:08 +02:00

114 lines
4.4 KiB
PHP

<?php
/*
Template Name: Clients
*/
get_header();
?>
<div class="container">
<div class="row">
<div class="col-lg-12 accroche">
<h1><?php echo get_field('titre_de_la_page');?></h1>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php
$client = 0;
$temoignage = 0;
$couleur = array("#C14FE3", "#1CC7C7", "#21D5F5", "#FA62B3", "#FAA400");
$couleurCompteur = 0;
for($compteur = 1; $compteur<=11; $compteur++)
{
?>
<div class="offset-lg-4 col-lg-8">
<div style="background-color: <?php echo $couleur[$couleurCompteur]; ?>" class="circleTop"></div>
</div>
<?php
$args = array (
'post_type' => 'customer',
'posts_per_page' => 4,
'offset' => $client,
);
$query = new WP_Query( $args );
if ($query->have_posts()) :
?>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="row">
<?php
while ($query->have_posts()) : $query->the_post();
//echo the_title();
//echo '<br>';
?>
<div class="col-sm-12 col-md-6 col-lg-6">
<div class="carteClient">
<?php the_post_thumbnail();?>
</div>
</div>
<?php
endwhile;
?>
</div>
</div>
<?php
endif;
$client = $client + 4;
$args = array(
'posts_per_page' => 1,
'offset' => $temoignage,
'cat' => 7,
);
$query = new WP_Query( $args );
if ($query->have_posts()) :
while ($query->have_posts()) : $query->the_post();
//echo the_title();
?>
<div class="offset-lg-6 col-lg-6">
<div class="temoignageTexte"><?php the_content(); ?></div>
<div class="row infopersonne">
<?php
if($temoignage % 2 == 0 ):
?>
<div class="col-lg-2">
<div style="background-color:<?php echo $couleur[$couleurCompteur];?>" class="barre"></div>
</div>
<div class="col-lg-10 nomContact">
<h3 style="color:<?php echo $couleur[$couleurCompteur];?>"><?php echo get_field('nom_du_client');?></h3>
<p><?php echo get_field('nom_du_contact');?><br><?php echo get_field('fonction_du_contact');?></p>
</div>
<?php
else:
?>
<div class="offset-lg-3 col-lg-7 nomContact">
<h3 style="color:<?php echo $couleur[$couleurCompteur];?>"><?php echo get_field('nom_du_client');?></h3>
<p><?php echo get_field('nom_du_contact');?><br><?php echo get_field('fonction_du_contact');?></p>
</div>
<div class="col-lg-2">
<div style="background-color:<?php echo $couleur[$couleurCompteur];?>" class="barre"></div>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endwhile;
endif;
$temoignage++;
$couleurCompteur++;
if($couleurCompteur == 5)
{
$couleurCompteur = 0;
}
}
?>
</div>
<div class="row">
<div class="col-12">
<div class="circleEnd"></div>
</div>
</div>
</div>
<?php get_footer();?>