<?php
/**
 * The template for displaying all pages
 *
 * @package ChaletMontagne
 * @since 1.0.0
 */

get_header();
?>

<div class="site-container">
    <main id="primary" class="site-main site-content" tabindex="-1">

        <?php
        // Breadcrumbs
        if (!is_front_page() && function_exists('chaletmontagne_breadcrumbs') && get_theme_mod('chaletmontagne_show_breadcrumbs', true)) :
            chaletmontagne_breadcrumbs();
        endif;
        ?>

        <?php
        while (have_posts()) :
            the_post();

            get_template_part('template-parts/content/content', 'page');

            // If comments are open or we have at least one comment, load up the comment template
            if (comments_open() || get_comments_number()) :
                comments_template();
            endif;

        endwhile;
        ?>

    </main><!-- #primary -->
</div>

<?php
get_footer();
