Metiers_du_patrimoine_theme/front-page.php
Antoine M 99485faa0c
All checks were successful
continuous-integration/drone/push Build is passing
fixing translations namespace
2024-12-04 16:21:44 +01:00

42 lines
1.5 KiB
PHP

<?php get_header(); ?>
<div class="homegrade-page-container homegrade-page-container--metiers-patrimoine">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "metiers-patrimoine-theme") ?>">
<?php
$currentPage = get_post();
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
?>
<ol>
<li>
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "metiers-patrimoine-theme") ?>">
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
</a>
</li>
<?php if ($grandParentPage) : ?>
<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) : ?>
<li><a href="<?php echo get_post_permalink($currentPage) ?>" aria-current="location" aria-disabled="true"><?php echo $currentPage->post_title ?></a></li>
<?php endif; ?>
</ol>
</nav>
<?php
the_content();
?>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php get_footer();