Make WordPress Core


Ignore:
Timestamp:
09/02/2013 09:20:56 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: add archive page templates, fix alignment bugs for archive headers, and use content-none.php for consistency. Props obenland, fixes #25181.

File:
1 edited

Legend:

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

    r25088 r25213  
    1919get_header(); ?>
    2020
    21 <section id="primary" class="content-area">
    22         <div id="content" class="site-content" role="main">
     21        <section id="primary" class="content-area">
     22                <div id="content" class="site-content" role="main">
    2323
    24                 <?php if ( have_posts() ) : ?>
     24                        <?php if ( have_posts() ) : ?>
    2525
    26                 <header class="page-header">
    27                         <h1 class="page-title">
    28                                 <?php
    29                                         if ( is_day() ) :
    30                                                 printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
     26                        <header class="page-header">
     27                                <h1 class="page-title">
     28                                        <?php
     29                                                if ( is_day() ) :
     30                                                        printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
    3131
    32                                         elseif ( is_month() ) :
    33                                                 printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
     32                                                elseif ( is_month() ) :
     33                                                        printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
    3434
    35                                         elseif ( is_year() ) :
    36                                                 printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
     35                                                elseif ( is_year() ) :
     36                                                        printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
    3737
    38                                         else :
    39                                                 _e( 'Archives', 'twentyfourteen' );
     38                                                else :
     39                                                        _e( 'Archives', 'twentyfourteen' );
    4040
    41                                         endif;
    42                                 ?>
    43                         </h1>
    44                 </header><!-- .page-header -->
     41                                                endif;
     42                                        ?>
     43                                </h1>
     44                        </header><!-- .page-header -->
    4545
    46                 <?php
    47                                 while ( have_posts() ) :
    48                                         the_post();
     46                        <?php
     47                                        while ( have_posts() ) :
     48                                                the_post();
    4949
    50                                         get_template_part( 'content', get_post_format() );
    51                                 endwhile;
    52                                 twentyfourteen_paging_nav();
     50                                                get_template_part( 'content', get_post_format() );
     51                                        endwhile;
     52                                        twentyfourteen_paging_nav();
    5353
    54                         else :
    55                                 get_template_part( 'no-results', 'archive' );
     54                                else :
     55                                        get_template_part( 'content', 'none' );
    5656
    57                         endif;
    58                 ?>
    59         </div><!-- #content -->
    60 </section><!-- #primary -->
     57                                endif;
     58                        ?>
     59                </div><!-- #content -->
     60        </section><!-- #primary -->
    6161
    6262<?php
Note: See TracChangeset for help on using the changeset viewer.