Make WordPress Core


Ignore:
Timestamp:
05/04/2011 10:54:50 PM (14 years ago)
Author:
lancewillett
Message:

Twenty Eleven updates and fixes, see #17198

  • Add explanatory comments in all templates, following Twenty Ten's example
  • Stick with twentyeleven_ for prefixing filter names
  • Use post format content templates in search results
  • First pass at adding a template for adding a sidebar to pages
  • Add a featured post header to standard sticky posts
  • Style fixes: print media, comment styles for pages with sidebars, color of meta links on image post format
File:
1 edited

Legend:

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

    r17787 r17802  
    1818            <div id="content" role="main">
    1919
    20                 <?php the_post(); ?>
     20                <?php
     21                    /* Queue the first post, that way we know
     22                     * what date we're dealing with (if that is the case).
     23                     *
     24                     * We reset this later so we can run the loop
     25                     * properly with a call to rewind_posts().
     26                     */
     27                    if ( have_posts() )
     28                        the_post();
     29                ?>
    2130
    2231                <header class="page-header">
     
    3443                </header>
    3544
    36                 <?php rewind_posts(); ?>
     45                <?php
     46                    /* Since we called the_post() above, we need to
     47                     * rewind the loop back to the beginning that way
     48                     * we can run the loop properly, in full.
     49                     */
     50                    rewind_posts();
     51                ?>
    3752
    3853                <?php twentyeleven_content_nav( 'nav-above' ); ?>
     
    4156                <?php while ( have_posts() ) : the_post(); ?>
    4257
    43                     <?php get_template_part( 'content', get_post_format() ); ?>
     58                    <?php
     59                        /* Include the Post-Format-specific template for the content.
     60                         * If you want to overload this in a child theme then include a file
     61                         * called loop-___.php (where ___ is the Post Format name) and that will be used instead.
     62                         */
     63                        get_template_part( 'content', get_post_format() );
     64                    ?>
    4465
    4566                <?php endwhile; ?>
Note: See TracChangeset for help on using the changeset viewer.