FEATURE Transforming repertoire into the front page — fixing Breadcrumb
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cfe696ecb1
commit
163eb8bb52
|
|
@ -10,8 +10,7 @@ get_header();
|
||||||
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "metiers-patrimoine-theme") ?>">
|
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "metiers-patrimoine-theme") ?>">
|
||||||
<?php
|
<?php
|
||||||
$currentPage = get_post();
|
$currentPage = get_post();
|
||||||
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
|
$frontPageId = get_post(get_option('page_on_front'));
|
||||||
$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
@ -20,12 +19,8 @@ get_header();
|
||||||
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($grandParentPage) : ?>
|
<li><a href="<?php echo get_post_permalink($frontPageId) ?>"><?php echo $frontPageId->post_title ?></a></li>
|
||||||
<li><a href="<?php echo get_post_permalink($grandParentPage) ?>"><?php echo $grandParentPage->post_title ?></a></li>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if ($parentPage) : ?>
|
|
||||||
<li><a href="<?php echo get_post_permalink($parentPage) ?>"><?php echo $parentPage->post_title ?></a></li>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if ($currentPage) : ?>
|
<?php if ($currentPage) : ?>
|
||||||
<li><a href="<?php echo get_post_permalink($currentPage) ?>" aria-current="location" aria-disabled="true"><?php echo $currentPage->post_title ?></a></li>
|
<li><a href="<?php echo get_post_permalink($currentPage) ?>" aria-current="location" aria-disabled="true"><?php echo $currentPage->post_title ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user