modifying company members and handling company members phone gsm
This commit is contained in:
parent
1198242f44
commit
56984d12f2
|
|
@ -107,42 +107,57 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
<p><?php echo $company_description ?></p>
|
<p><?php echo $company_description ?></p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<section class="artisans-post__section artisans-post__section--team ">
|
|
||||||
<h2 class="artisans-post__section-title"><?php echo __("L'équipe", "metiers-patrimoine-theme") ?></h2>
|
|
||||||
|
|
||||||
<?php
|
<?php if ($company_members): ?>
|
||||||
$company_description = get_field('company_description');
|
<section class="artisans-post__section artisans-post__section--team ">
|
||||||
$company_members = get_field('company_members');
|
<h2 class="artisans-post__section-title"><?php echo __("L'équipe", "metiers-patrimoine-theme") ?></h2>
|
||||||
?>
|
|
||||||
<?php foreach ($company_members as $member): ?>
|
<?php
|
||||||
<div class="artisan-member">
|
$company_description = get_field('company_description');
|
||||||
<img class="artisan-member__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-equipe.svg' ?>" alt="">
|
$company_members = get_field('company_members');
|
||||||
<h3 class="artisan-member__name"><?php echo $member['first_name'] . ' ' . $member['last_name'] ?></h3>
|
?>
|
||||||
</div>
|
<?php foreach ($company_members as $member): ?>
|
||||||
<p class="artisan-member__description"><?php echo $member['description'] ?></p>
|
<?php
|
||||||
<?php endforeach; ?>
|
$member_gsm_number = $member['member_gsm_number'];
|
||||||
|
$formatted_member_gsm_number = preg_replace('/^(\+\d{2})(\d{3})(\d{2})(\d{2})(\d{2})$/', '$1 $2 $3 $4 $5', $member_gsm_number);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="artisan-member">
|
||||||
|
<img class="artisan-member__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-equipe.svg' ?>" alt="">
|
||||||
|
<div>
|
||||||
|
<h3 class="artisan-member__name"><?php echo $member['first_name'] . ' ' . $member['last_name'] ?></h3>
|
||||||
|
<?php if ($member_gsm_number): ?>
|
||||||
|
<a class="artisan-member__phone" href="tel:<?php echo $member_gsm_number ?>"><?php echo $formatted_member_gsm_number ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p class="artisan-member__description"><?php echo $member['description'] ?></p>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<section class="artisans-post__section artisans-post__section--chantiers">
|
<?php endif; ?>
|
||||||
<h2 class="artisans-post__section-title"> <?php echo __(" Chantiers réalisés ", "metiers-patrimoine-theme") ?>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$args = array(
|
<?php
|
||||||
'post_type' => 'chantiers',
|
$args = array(
|
||||||
'posts_per_page' => -1,
|
'post_type' => 'chantiers',
|
||||||
'meta_query' => array(
|
'posts_per_page' => -1,
|
||||||
array(
|
'meta_query' => array(
|
||||||
'key' => 'artisan',
|
array(
|
||||||
'value' => $post->ID,
|
'key' => 'artisan',
|
||||||
'compare' => 'LIKE'
|
'value' => $post->ID,
|
||||||
)
|
'compare' => 'LIKE'
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
$chantiers = new WP_Query($args);
|
);
|
||||||
?>
|
$chantiers = new WP_Query($args);
|
||||||
<?php if ($chantiers->posts): ?>
|
?>
|
||||||
|
<?php if ($chantiers->posts): ?>
|
||||||
|
<section class="artisans-post__section artisans-post__section--chantiers">
|
||||||
|
<h2 class="artisans-post__section-title"> <?php echo __(" Chantiers réalisés ", "metiers-patrimoine-theme") ?>
|
||||||
|
</h2>
|
||||||
|
|
||||||
<?php foreach ($chantiers->posts as $chantier): ?>
|
<?php foreach ($chantiers->posts as $chantier): ?>
|
||||||
<?php
|
<?php
|
||||||
$chantier_description = get_field('description', $chantier->ID);
|
$chantier_description = get_field('description', $chantier->ID);
|
||||||
|
|
@ -159,68 +174,68 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
</div>
|
</div>
|
||||||
<p class="chantier__description"><?php echo $chantier_description ?></p>
|
<p class="chantier__description"><?php echo $chantier_description ?></p>
|
||||||
|
|
||||||
<div class="chantier__photo-grid">
|
|
||||||
<?php
|
|
||||||
foreach ($pictures as $key => $picture) {
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php foreach ($pictures as $picture): ?>
|
<?php
|
||||||
<img src="<?php echo $picture['sizes']['large'] ?>" />
|
// Rendre Un bloc acf/lightbox-gallery avec les photos du chantier
|
||||||
<?php endforeach; ?>
|
$block_content = '<!-- wp:acf/lightbox-gallery {"data":{"gallery":' . json_encode($pictures) . '}} /-->';
|
||||||
</div>
|
echo do_blocks($block_content);
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="previous-next-posts previous-next-artisan">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$prevPost = get_previous_post();
|
||||||
|
$nextPost = get_next_post();
|
||||||
|
?>
|
||||||
|
<?php if ($nextPost) : ?>
|
||||||
|
<?php $nextPostcover = get_the_post_thumbnail_url($nextPost->ID, 'full'); ?>
|
||||||
|
<a class="previous-next-posts__next previous-next-artisans__next" href="<?php echo get_the_permalink($nextPost->ID) ?>">
|
||||||
|
|
||||||
|
<div class="previous-next-posts__link-content previous-next-artisan__link-content">
|
||||||
|
<p class="link-subtitle"><?php echo __("Entreprise suivante ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||||
|
<p class="link-title"><?php echo $nextPost->post_title ?></p>
|
||||||
|
</div>
|
||||||
|
<?php if ($nextPostcover): ?>
|
||||||
|
<img class="previous-next-posts__post-thumbnail" src="<?php echo $nextPostcover ?>" alt="">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($prevPost) : ?>
|
||||||
|
<?php $prevPostcover = get_the_post_thumbnail_url($prevPost->ID, 'full'); ?>
|
||||||
|
<a class="previous-next-posts__previous previous-next-artisan__previous" href="<?php echo get_the_permalink($prevPost->ID) ?>">
|
||||||
</section>
|
<?php if ($prevPostcover): ?>
|
||||||
|
<img class="previous-next-posts__post-thumbnail" src="<?php echo $prevPostcover ?>" alt="">
|
||||||
</div>
|
<?php endif; ?>
|
||||||
|
<div class="previous-next-posts__link-content previous-next-artisan__link-content">
|
||||||
|
<p class="link-subtitle"><?php echo __("Entreprise précédente ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||||
|
<p class="link-title"><?php echo $prevPost->post_title ?></p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$prevPost = get_previous_post();
|
|
||||||
$nextPost = get_next_post();
|
|
||||||
// echo $prev_post->post_title;
|
|
||||||
// write_log($nextPost);
|
|
||||||
|
|
||||||
echo '<pre>';
|
|
||||||
print_r($prevPost);
|
|
||||||
echo '</pre>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if ($nextPost) : ?>
|
|
||||||
<a class="previous-next-questions__next" href="<?php echo get_the_permalink($nextPost->ID) ?>">
|
|
||||||
<div class="previous-next-questions__link-content">
|
|
||||||
<p class="question_type"><?php echo __("Entreprise suivante ", "homegrade-theme__texte-fonctionnel") ?></p>
|
|
||||||
<p class="question_title"><?php echo $nextPost->post_title ?></p>
|
|
||||||
</div>
|
|
||||||
<img class="thematique_icon" src="<?php echo $thematique_icon['url'] ?>" alt="">
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if ($previousPost) : ?>
|
|
||||||
<a class="previous-next-questions__previous" href="<?php echo get_the_permalink($previousPost->ID) ?>">
|
|
||||||
<img class="thematique_icon" src="<?php echo $thematique_icon['url'] ?>" alt="">
|
|
||||||
<div class="previous-next-questions__link-content">
|
|
||||||
<p class="question_type"><?php echo __("Entreprise précédente ", "homegrade-theme__texte-fonctionnel") ?></p>
|
|
||||||
<p class="question_title"><?php echo $previousPost->post_title ?></p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
get_template_part('template-components/conseil-patrimoine-redirector', null, array());
|
get_template_part('template-components/conseil-patrimoine-redirector', null, array());
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user