page.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * The template for displaying all pages.
  4. *
  5. * This is the template that displays all pages by default.
  6. * Please note that this is the WordPress construct of pages
  7. * and that other 'pages' on your WordPress site may use a
  8. * different template.
  9. *
  10. * @link https://codex.wordpress.org/Template_Hierarchy
  11. *
  12. * @package Dara
  13. */
  14. get_header(); ?>
  15. <?php while ( have_posts() ) : the_post(); ?>
  16. <?php get_template_part( 'components/page/content', 'hero' ); ?>
  17. <?php endwhile; ?>
  18. <?php rewind_posts(); ?>
  19. <div class="content-wrapper <?php echo esc_attr( dara_additional_class() ); ?>">
  20. <div id="primary" class="content-area">
  21. <main id="main" class="site-main" role="main">
  22. <?php
  23. while ( have_posts() ) : the_post();
  24. get_template_part( 'components/page/content', 'page' );
  25. // If comments are open or we have at least one comment, load up the comment template.
  26. if ( comments_open() || get_comments_number() ) :
  27. comments_template();
  28. endif;
  29. endwhile; // End of the loop.
  30. ?>
  31. </main><!-- .site-main -->
  32. </div><!-- .content-area -->
  33. <?php get_sidebar(); ?>
  34. </div><!-- .content-wrapper -->
  35. <?php get_footer();