page.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 and that
  7. * other 'pages' on your WordPress site will use a different template.
  8. *
  9. * @package WordPress
  10. * @subpackage Twenty_Fourteen
  11. * @since Twenty Fourteen 1.0
  12. */
  13. get_header(); ?>
  14. <div id="main-content" class="main-content">
  15. <?php
  16. if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
  17. // Include the featured content template.
  18. get_template_part( 'featured-content' );
  19. }
  20. ?>
  21. <div id="primary" class="content-area">
  22. <div id="content" class="site-content" role="main">
  23. <?php
  24. // Start the Loop.
  25. while ( have_posts() ) : the_post();
  26. // Include the page content template.
  27. get_template_part( 'content', 'page' );
  28. // If comments are open or we have at least one comment, load up the comment template.
  29. if ( comments_open() || get_comments_number() ) {
  30. comments_template();
  31. }
  32. endwhile;
  33. ?>
  34. </div><!-- #content -->
  35. </div><!-- #primary -->
  36. <?php get_sidebar( 'content' ); ?>
  37. </div><!-- #main-content -->
  38. <?php
  39. get_sidebar();
  40. get_footer();