handling nederland color scheme
This commit is contained in:
parent
acef13761a
commit
db1b1562d3
|
|
@ -36,39 +36,40 @@ function build_chapter_index($blocks)
|
||||||
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||||
$mainThematique = getMainThematique($currentThematique);
|
$mainThematique = getMainThematique($currentThematique);
|
||||||
$thematiqueColorSlug = $mainThematique->slug;
|
$thematiqueColorSlug = $mainThematique->slug;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>"">
|
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>">
|
||||||
<nav class=" breadcrumbs_navigation" aria-label="breadcrumbs">
|
<nav class=" breadcrumbs_navigation" aria-label="breadcrumbs">
|
||||||
<?php
|
<?php
|
||||||
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="<?php echo home_url() ?>">Home</a></li>
|
<li><a href="<?php echo home_url() ?>">Home</a></li>
|
||||||
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
||||||
<?php if ($mainThematique != $currentThematique) : ?>
|
<?php if ($mainThematique != $currentThematique) : ?>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'conseils', // the post type
|
'post_type' => 'conseils', // the post type
|
||||||
'tax_query' => array(
|
'tax_query' => array(
|
||||||
array(
|
array(
|
||||||
'taxonomy' => 'thematiques', // the custom vocabulary
|
'taxonomy' => 'thematiques', // the custom vocabulary
|
||||||
'field' => 'term_id', // term_id, slug or name
|
'field' => 'term_id', // term_id, slug or name
|
||||||
'terms' => array($mainThematique->term_id),
|
'terms' => array($mainThematique->term_id),
|
||||||
'include_children' => false,
|
'include_children' => false,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
||||||
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
?>
|
||||||
?>
|
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
||||||
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php echo the_permalink() ?>" aria-current="location"><?php echo $currentThematique->name ?></a></li>
|
<li><a href="<?php echo the_permalink() ?>" aria-current="location"><?php echo $currentThematique->name ?></a></li>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user