Changeset 14708 for trunk/wp-content/themes/twentyten/loop.php
- Timestamp:
- 05/17/2010 06:36:11 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyten/loop.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/loop.php
r14707 r14708 10 10 * @package WordPress 11 11 * @subpackage Twenty_Ten 12 * @since 3.0.012 * @since Twenty Ten 1.0 13 13 */ 14 14 ?> … … 27 27 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> 28 28 <div class="entry-content"> 29 <p><?php _e( 'Apologies, but no results were found for the requested Archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>29 <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p> 30 30 <?php get_search_form(); ?> 31 31 </div><!-- .entry-content --> … … 33 33 <?php endif; ?> 34 34 35 <?php /* Start the Loop */ ?> 35 <?php 36 /* Start the Loop. 37 * 38 * In Twenty Ten we use the same loop in multiple contexts. 39 * It is broken into three main parts: when we're displaying 40 * posts that are in the gallery category, when we're displaying 41 * posts in the asides category, and finally all other posts. 42 * 43 * Additionally, we sometimes check for whether we are on an 44 * archive page, a search page, etc., allowing for small differences 45 * in the loop on each template without actually duplicating 46 * the rest of the loop that is shared. 47 * 48 * Without further ado, the loop: 49 */ ?> 36 50 <?php while ( have_posts() ) : the_post(); ?> 37 51 38 <?php /* How to Display posts in the Gallery Category */ ?> 52 <?php /* How to display posts in the Gallery category. */ ?> 53 39 54 <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> 40 55 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 72 87 73 88 <?php /* How to display posts in the asides category */ ?> 89 74 90 <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?> 75 91 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 76 <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?> 92 93 <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> 77 94 <div class="entry-summary"> 78 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' )); ?>95 <?php the_excerpt(); ?> 79 96 </div><!-- .entry-summary --> 80 <?php else : ?>97 <?php else : ?> 81 98 <div class="entry-content"> 82 99 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 83 100 </div><!-- .entry-content --> 84 <?php endif; ?>101 <?php endif; ?> 85 102 86 103 <div class="entry-utility"> … … 90 107 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 91 108 </div><!-- #entry-utility --> 92 </div><!-- #post- <?php the_ID(); ?>-->109 </div><!-- #post-(id) --> 93 110 94 <?php /* How to display all other posts */ ?> 111 <?php /* How to display all other posts. */ ?> 112 95 113 <?php else : ?> 96 114 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 101 119 </div><!-- .entry-meta --> 102 120 103 <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search?>121 <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> 104 122 <div class="entry-summary"> 105 123 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> … … 115 133 <?php if ( count( get_the_category() ) ) : ?> 116 134 <span class="cat-links"> 117 <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' .get_the_category_list( ', ' ) ); ?>135 <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' . get_the_category_list( ', ' ) ); ?> 118 136 </span> 119 137 <span class="meta-sep">|</span> … … 135 153 <?php comments_template( '', true ); ?> 136 154 137 <?php endif; // if different categories queried ?> 138 <?php endwhile; ?> 155 <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> 156 157 <?php endwhile; // End the loop. Whew. ?> 139 158 140 159 <?php /* Display navigation to next/previous pages when applicable */ ?>
Note: See TracChangeset
for help on using the changeset viewer.