wp/wp-content/themes/twentyfourteen/page.php
changeset 5 5e2f62d02dcd
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
       
     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 
       
    14 get_header(); ?>
       
    15 
       
    16 <div id="main-content" class="main-content">
       
    17 
       
    18 <?php
       
    19 	if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
       
    20 		// Include the featured content template.
       
    21 		get_template_part( 'featured-content' );
       
    22 	}
       
    23 ?>
       
    24 	<div id="primary" class="content-area">
       
    25 		<div id="content" class="site-content" role="main">
       
    26 
       
    27 			<?php
       
    28 				// Start the Loop.
       
    29 				while ( have_posts() ) : the_post();
       
    30 
       
    31 					// Include the page content template.
       
    32 					get_template_part( 'content', 'page' );
       
    33 
       
    34 					// If comments are open or we have at least one comment, load up the comment template.
       
    35 					if ( comments_open() || get_comments_number() ) {
       
    36 						comments_template();
       
    37 					}
       
    38 				endwhile;
       
    39 			?>
       
    40 
       
    41 		</div><!-- #content -->
       
    42 	</div><!-- #primary -->
       
    43 	<?php get_sidebar( 'content' ); ?>
       
    44 </div><!-- #main-content -->
       
    45 
       
    46 <?php
       
    47 get_sidebar();
       
    48 get_footer();