carhop__carhop-theme__DEV/single-activites.php

63 lines
1.7 KiB
PHP

<?php get_header(); ?>
<?php
$postType = get_post_type();
?>
<div class="page-single page-single--<?php echo $postType; ?>" data-article-id="<?php echo get_the_ID(); ?>">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('template-parts/components/posts/post-header', null, array(
'post_date_info_label' => 'Publication'
)); ?>
<div class="content-wrapper" data-active-tab="post">
<div class="content-area">
<?php get_template_part('template-parts/components/posts/post-content', null, array(
'ID' => get_the_ID()
)); ?>
<?php get_template_part('template-parts/components/posts/post-authors', null, array(
'postId' => get_the_ID()
)); ?>
</div>
<aside class="sidebar">
<?php get_template_part('template-parts/post-types/activites/sidebar-single-activites'); ?>
</aside>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php
$type = get_post_specific_type_terms(get_the_ID())[0] ?? null;
if (isset($type) && ($type->slug === 'formation-archives' || $type->slug === 'formation-histoire')) {
get_template_part('template-parts/compositions/formation-sur-demande');
}
if (isset($type) && ($type->slug === 'conference')) {
get_template_part('template-parts/compositions/conferences-sur-demande');
}
if (isset($type) && ($type->slug === 'animation')) {
get_template_part('template-parts/compositions/animation-sur-demande');
}
?>
<?php get_template_part('template-parts/compositions/soutenir'); ?>
<?php get_template_part('template-parts/compositions/infolettre'); ?>
</div>
<?php
get_footer();