Make WordPress Core


Ignore:
Timestamp:
08/14/2013 04:38:01 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: first pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/page.php

    r24832 r25021  
    1414get_header(); ?>
    1515
    16 <?php if ( is_front_page() ) : ?>
    17 
    18     <div class="front-page-content-wrapper">
    19         <div class="front-page-content-main">
    20 
    21             <?php if ( twentyfourteen_has_featured_posts() ) : ?>
    22                 <?php get_template_part( 'featured-content' ); ?>
    23             <?php endif; ?>
    24 
    25             <div class="front-page-content-area clearfix">
    26 
    27                 <div id="primary" class="content-area no-sidebar">
    28                     <div id="content" class="site-content" role="main">
    29                     <?php
    30                         if ( have_posts() ) :
    31                             while ( have_posts() ) :
    32                                 the_post();
    33                                 get_template_part( 'content', 'page' );
    34                                 comments_template( '', true );
    35                             endwhile;
    36 
    37                             twentyfourteen_content_nav( 'nav-below' );
    38                         else :
    39                             get_template_part( 'no-results', 'index' );
    40                         endif;
    41                     ?>
    42                     </div><!-- #content .site-content -->
    43                 </div><!-- #primary .content-area -->
    44 
    45                 <?php get_template_part( 'recent-formatted-posts' ); ?>
    46 
    47             </div><!-- .front-page-content-area -->
    48 
    49         </div><!-- .front-page-content-main -->
    50     </div><!-- .front-page-content-wrapper -->
    51 
    52     <?php get_sidebar(); ?>
    53 
    54 <?php else : ?>
    55 
    5616    <div id="primary" class="content-area">
    5717        <div id="content" class="site-content" role="main">
    5818
    59             <?php while ( have_posts() ) : the_post(); ?>
     19            <?php
     20                while ( have_posts() ) :
     21                    the_post();
    6022
    61                 <?php get_template_part( 'content', 'page' ); ?>
     23                    get_template_part( 'content', 'page' );
    6224
    63                 <?php comments_template( '', true ); ?>
    64 
    65             <?php endwhile; ?>
     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                endwhile;
     29            ?>
    6630
    6731        </div><!-- #content .site-content -->
    6832    </div><!-- #primary .content-area -->
    6933
    70     <?php get_sidebar( 'content' ); ?>
    71 
    72     <?php get_sidebar(); ?>
    73 
    74 <?php endif; // is_front_page() check ?>
    75 
    76 <?php get_footer(); ?>
     34<?php
     35get_sidebar( 'content' );
     36get_sidebar();
     37get_footer();
Note: See TracChangeset for help on using the changeset viewer.