64 lines
1.6 KiB
PHP
64 lines
1.6 KiB
PHP
<?php
|
|
get_header();
|
|
$args = array(
|
|
'meta_key' => '_wp_page_template',
|
|
'meta_value' => "template-news.php"
|
|
);
|
|
$relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
|
|
?>
|
|
|
|
<?php if (have_posts()) : ?>
|
|
<?php while (have_posts()) : the_post(); ?>
|
|
|
|
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
|
|
<ol>
|
|
<li>
|
|
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
|
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<?php echo get_the_permalink($relatedPageTemplatePage) ?>">
|
|
<?php echo __("News", "homegrade-theme__texte-fonctionnel") ?>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<?php echo get_the_permalink(get_the_id()) ?>" aria-current='location'>
|
|
<?php echo get_the_title(get_the_id()) ?>
|
|
</a>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
|
|
<div class="post-news-page-container">
|
|
<?php /* --------
|
|
HEADING BOX
|
|
---------------*/ ?>
|
|
<?php
|
|
get_template_part("template-components/news-heading-box", null, array(
|
|
"news_type" => get_the_terms(get_the_ID(), 'news-type'),
|
|
"title" => get_the_title(),
|
|
"thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'news-heading-box__thumbnail')),
|
|
"published" => get_the_date()
|
|
|
|
));
|
|
?>
|
|
<div class="entry-content single-news-editor-content">
|
|
<?php
|
|
the_content();
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php endwhile; ?>
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
get_footer();
|