Changeset 19915 for trunk/wp-content/themes/twentytwelve/content.php
- Timestamp:
- 02/14/2012 03:54:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/content.php
r19842 r19915 1 1 <?php 2 2 /** 3 * The default template for displaying content 3 * The default template for displaying content on indexed pages (home, archive, search) 4 4 * 5 5 * @package WordPress … … 11 11 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 12 <header class="entry-header"> 13 <?php if ( is_sticky() ) : ?>14 <hgroup>15 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>16 <h3 class="entry-format"><?php _e( 'Featured', 'twentytwelve' ); ?></h3>17 </hgroup>18 <?php else : ?>19 13 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 20 <?php endif; ?>21 14 22 <?php if ( 'post' == get_post_type() ) : ?>15 <?php if ( 'post' == get_post_type() ) : // Hide entry meta for pages ?> 23 16 <div class="entry-meta"> 24 17 <?php twentytwelve_posted_on(); ?> … … 27 20 </header><!-- .entry-header --> 28 21 29 <?php if ( is_search() ) : // Only display Excerpts for Search ?>22 <?php if ( is_search() ) : // Only display excerpts for search ?> 30 23 <div class="entry-summary"> 31 24 <?php the_excerpt(); ?> … … 39 32 40 33 <footer class="entry-meta"> 41 <?php $show_sep = false; ?> 42 <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> 34 <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages ?> 43 35 <?php 44 36 /* translators: used between list items, there is a space after the comma */ 45 37 $categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) ); 46 if ( $categories_list ) :38 if ( $categories_list ) : 47 39 ?> 48 40 <span class="cat-links"> 49 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); 50 $show_sep = true; ?> 41 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?> 51 42 </span> 52 43 <?php endif; // End if categories ?> … … 54 45 /* translators: used between list items, there is a space after the comma */ 55 46 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) ); 56 if ( $tags_list ): 57 if ( $show_sep ) : ?> 58 <span class="sep"> | </span> 59 <?php endif; // End if $show_sep ?> 47 if ( $tags_list ) : ?> 60 48 <span class="tag-links"> 61 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); 62 $show_sep = true; ?> 49 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> 63 50 </span> 64 51 <?php endif; // End if $tags_list ?> … … 66 53 67 54 <?php if ( comments_open() ) : ?> 68 <?php if ( $show_sep ) : ?>69 <span class="sep"> | </span>70 <?php endif; // End if $show_sep ?>71 55 <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '<b>1</b> Reply', 'twentytwelve' ), __( '<b>%</b> Replies', 'twentytwelve' ) ); ?></span> 72 56 <?php endif; // End if comments_open() ?>
Note: See TracChangeset
for help on using the changeset viewer.