[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The default template for displaying content 4 * 5 * Used for both single and index/archive/search. 6 * 7 * @package WordPress 8 * @subpackage Twenty_Twelve 9 * @since Twenty Twelve 1.0 10 */ 11 ?> 12 13 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 14 <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> 15 <div class="featured-post"> 16 <?php _e( 'Featured post', 'twentytwelve' ); ?> 17 </div> 18 <?php endif; ?> 19 <header class="entry-header"> 20 <?php 21 if ( ! post_password_required() && ! is_attachment() ) : 22 the_post_thumbnail(); 23 endif; 24 ?> 25 26 <?php if ( is_single() ) : ?> 27 <h1 class="entry-title"><?php the_title(); ?></h1> 28 <?php else : ?> 29 <h1 class="entry-title"> 30 <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> 31 </h1> 32 <?php endif; // is_single() ?> 33 <?php if ( comments_open() ) : ?> 34 <div class="comments-link"> 35 <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?> 36 </div><!-- .comments-link --> 37 <?php endif; // comments_open() ?> 38 </header><!-- .entry-header --> 39 40 <?php if ( is_search() ) : // Only display excerpts for search. ?> 41 <div class="entry-summary"> 42 <?php the_excerpt(); ?> 43 </div><!-- .entry-summary --> 44 <?php else : ?> 45 <div class="entry-content"> 46 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?> 47 <?php 48 wp_link_pages( 49 array( 50 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 51 'after' => '</div>', 52 ) 53 ); 54 ?> 55 </div><!-- .entry-content --> 56 <?php endif; ?> 57 58 <footer class="entry-meta"> 59 <?php twentytwelve_entry_meta(); ?> 60 <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> 61 <?php 62 // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. 63 if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : 64 ?> 65 <div class="author-info"> 66 <div class="author-avatar"> 67 <?php 68 /** This filter is documented in author.php */ 69 $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ); 70 echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); 71 ?> 72 </div><!-- .author-avatar --> 73 <div class="author-description"> 74 <h2> 75 <?php 76 /* translators: %s: Author display name. */ 77 printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); 78 ?> 79 </h2> 80 <p><?php the_author_meta( 'description' ); ?></p> 81 <div class="author-link"> 82 <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> 83 <?php 84 /* translators: %s: Author display name. */ 85 printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentytwelve' ), get_the_author() ); 86 ?> 87 </a> 88 </div><!-- .author-link --> 89 </div><!-- .author-description --> 90 </div><!-- .author-info --> 91 <?php endif; ?> 92 </footer><!-- .entry-meta --> 93 </article><!-- #post -->
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |