page.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 Ixion
  13. */
  14. get_header();
  15. //Starting The Loop earlier to take advantage of functions like has_post_thumbnail()
  16. while ( have_posts() ) : the_post();
  17. if ( has_post_thumbnail() ) : ?>
  18. <div class="post-thumbnail">
  19. <?php the_post_thumbnail( 'ixion-featured-image' ); ?>
  20. </div>
  21. <?php endif; ?>
  22. <header class="entry-header">
  23. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  24. </header>
  25. <div id="primary" class="content-area">
  26. <main id="main" class="site-main" role="main">
  27. <?php
  28. get_template_part( 'components/page/content', 'page' );
  29. // If comments are open or we have at least one comment, load up the comment template.
  30. if ( comments_open() || get_comments_number() ) :
  31. comments_template();
  32. endif;
  33. ?>
  34. </main>
  35. </div>
  36. <?php
  37. endwhile; // End of the loop.
  38. get_sidebar();
  39. get_footer();