FEATURE Introducing data handling and page for activites post type
This commit is contained in:
parent
d263267b82
commit
b70102e465
29
archive-activites.php
Normal file
29
archive-activites.php
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php get_header(); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$current_post_type = get_post_type();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<main id="content" class="site-content flex-grow">
|
||||||
|
<?php get_template_part('template-parts/post-types/activites/archive-header'); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- #### ACTIVITÉS POST GRID #### -->
|
||||||
|
<?php get_template_part('template-parts/components/archive/post-grid', null, array(
|
||||||
|
'current_post_type' => 'activites',
|
||||||
|
'post_amount' => -1,
|
||||||
|
'grid_title' => 'Trouver une activité',
|
||||||
|
)); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- #### SOUTENIR #### -->
|
||||||
|
<?php get_template_part('template-parts/compositions/soutenir'); ?>
|
||||||
|
|
||||||
|
<!-- #### INFOLETTRE #### -->
|
||||||
|
<?php get_template_part('template-parts/compositions/infolettre'); ?>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
62
single-activites.php
Normal file
62
single-activites.php
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?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();
|
||||||
Loading…
Reference in New Issue
Block a user