working on singles

This commit is contained in:
Antoine M 2023-11-09 14:27:27 +01:00
parent f4cca3cafa
commit 8077f524a3
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,10 @@
<?php
get_header();
$args = array(
'meta_key' => '_wp_page_template',
'meta_value' => "template-archive-jobs.php"
);
$relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
?>
<?php if (have_posts()) : ?>
@ -18,7 +23,7 @@ get_header();
</li>
<li>
<a href="<?php echo get_the_permalink($relatedPageTemplatePage) ?>">
<?php echo __("News", "homegrade-theme__texte-fonctionnel") ?>
<?php echo __("Jobs", "homegrade-theme__texte-fonctionnel") ?>
</a>
</li>
<li>
@ -35,9 +40,9 @@ get_header();
HEADING BOX
---------------*/ ?>
<?php
get_template_part("template-components/news-heading-box", null, array(
get_template_part("template-components/heading-box--job", null, array(
"title" => get_the_title(),
"thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'news-heading-box__thumbnail')),
"thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'heading-box--jobs__thumbnail')),
"published" => get_the_date(),
"subtitle" => __("Offre d'emploi", "homegrade-theme__texte-fonctionnel"),

View File

@ -40,10 +40,10 @@ $relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
HEADING BOX
---------------*/ ?>
<?php
get_template_part("template-components/news-heading-box", null, array(
get_template_part("template-components/heading-box--news", 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')),
"thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'heading-box--news__thumbnail')),
"published" => get_the_date()
));