updating news templating
This commit is contained in:
parent
5d806cad96
commit
adce6ca331
|
|
@ -2,62 +2,66 @@
|
||||||
get_header();
|
get_header();
|
||||||
$args = array(
|
$args = array(
|
||||||
'meta_key' => '_wp_page_template',
|
'meta_key' => '_wp_page_template',
|
||||||
'meta_value' => "template-news.php"
|
'meta_value' => "template-archive-news.php"
|
||||||
);
|
);
|
||||||
$relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
|
$relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (have_posts()) : ?>
|
<?php if (have_posts()) : ?>
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
|
<div class="single-post-container single-post-container--news <?php echo $thematiqueColorSlug ? "single-post-container--" . $thematiqueColorSlug : "" ?>">
|
||||||
|
|
||||||
<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 /* --------
|
<?php /* --------
|
||||||
|
BREADCRUMB
|
||||||
|
---------------*/ ?>
|
||||||
|
<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
|
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
|
<?php
|
||||||
the_content();
|
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()
|
||||||
|
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
|
<article class="entry-content single-news-editor-content">
|
||||||
|
<?php
|
||||||
|
the_content();
|
||||||
|
?>
|
||||||
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
get_footer();
|
get_footer();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user