carhop__dynamiques-theme__P.../single-revues.php
Nonimart d5f86028c1
All checks were successful
continuous-integration/drone/push Build is passing
FEATURE Implkementing innersearch revues and refgactoring search results
2025-10-16 16:19:22 +02:00

104 lines
2.9 KiB
PHP

<?php get_header(); ?>
<?php
$current_issue = get_queried_object();
$issue_related_articles = get_field('articles', $current_issue->ID);
$articles = get_field('articles', $current_issue->ID);
?>
<div class="page--single-revue" data-revue-id="<?php echo get_the_ID(); ?>">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$issue_number = get_field('issue_number', $current_issue->ID);
?>
<?php get_template_part('template-parts/post-header'); ?>
<?php get_template_part('template-parts/revues/revue-toolbar'); ?>
<div class="content-wrapper" data-active-tab="table-of-contents">
<div class="sidebar">
<div class="search-field">
<input type="text" placeholder="Rechercher dans la revue">
</div>
<?php
$tags = get_revue_terms($current_issue->ID, 'etiquettes');
?>
<?php if ($tags) : ?>
<div class="tags">
<h3 class="tags__title">Tags</h3>
<ul class="tags-list">
<?php foreach ($tags as $tag) : ?>
<li>
<a class="article-tag" href="<?php echo add_query_arg('etiquette', $tag->slug, get_post_type_archive_link('articles')); ?>">
<?php echo $tag->name; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
<div class="content-area">
<?php if (has_excerpt()) : ?>
<details class="edito">
<summary>
<h2 class="edito__title">
Edito
</h2>
<div class="open-close-icon">
<img src="https://homegrade.brussels/wp-content/themes/Deligraph_Homegrade/resources/img/graphic-assets/chevron_down.svg" class="open-close-cta" alt="">
</div>
</summary>
<div class="edito__content-wrapper">
<div class="edito__content">
<?php the_excerpt(); ?>
<div class="edito__cta">
<button class="cta cta--primary">Bonne Lecture</button>
</div>
</div>
</div>
</details>
<?php endif; ?>
<?php get_template_part('template-parts/revues/revue-authors', null, array(
'postId' => get_the_ID()
)); ?>
<?php get_template_part('template-parts/articles/article-informations', null, array(
'revueID' => get_the_ID()
)); ?>
<?php get_template_part('template-parts/revues/table-matiere-revue', null, array(
'revueID' => get_the_ID()
)); ?>
</div>
</div>
<!-- #### RECOMMANDATIONS #### -->
<?php echo do_blocks('<!-- wp:dynamiques-blocks/nos-recommandations /-->'); ?>
<!-- #### EXPLORE TAGS #### -->
<?php get_template_part('template-parts/components/explore-tags'); ?>
<!-- #### INFOLETTRE #### -->
<?php get_template_part('template-parts/components/subscribe-infolettre'); ?>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php
get_footer();