]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-content/themes/twentytwelve/content.php
WordPress 4.0.1
[autoinstalls/wordpress.git] / wp-content / themes / twentytwelve / content.php
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 if ( ! post_password_required() && ! is_attachment() ) :
21                                 the_post_thumbnail();
22                         endif; ?>
23
24                         <?php if ( is_single() ) : ?>
25                         <h1 class="entry-title"><?php the_title(); ?></h1>
26                         <?php else : ?>
27                         <h1 class="entry-title">
28                                 <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
29                         </h1>
30                         <?php endif; // is_single() ?>
31                         <?php if ( comments_open() ) : ?>
32                                 <div class="comments-link">
33                                         <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
34                                 </div><!-- .comments-link -->
35                         <?php endif; // comments_open() ?>
36                 </header><!-- .entry-header -->
37
38                 <?php if ( is_search() ) : // Only display Excerpts for Search ?>
39                 <div class="entry-summary">
40                         <?php the_excerpt(); ?>
41                 </div><!-- .entry-summary -->
42                 <?php else : ?>
43                 <div class="entry-content">
44                         <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
45                         <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
46                 </div><!-- .entry-content -->
47                 <?php endif; ?>
48
49                 <footer class="entry-meta">
50                         <?php twentytwelve_entry_meta(); ?>
51                         <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
52                         <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
53                                 <div class="author-info">
54                                         <div class="author-avatar">
55                                                 <?php
56                                                 /** This filter is documented in author.php */
57                                                 $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 );
58                                                 echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
59                                                 ?>
60                                         </div><!-- .author-avatar -->
61                                         <div class="author-description">
62                                                 <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
63                                                 <p><?php the_author_meta( 'description' ); ?></p>
64                                                 <div class="author-link">
65                                                         <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
66                                                                 <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
67                                                         </a>
68                                                 </div><!-- .author-link -->
69                                         </div><!-- .author-description -->
70                                 </div><!-- .author-info -->
71                         <?php endif; ?>
72                 </footer><!-- .entry-meta -->
73         </article><!-- #post -->