1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Eleven
  7. * @since Twenty Eleven 1.0
  8. */
  9. ?>
  10.  
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <header class="entry-header">
  13. <?php if ( is_sticky() ) : ?>
  14. <hgroup>
  15. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  16. <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
  17. </hgroup>
  18. <?php else : ?>
  19. <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  20. <?php endif; ?>
  21.  
  22. <?php if ( 'post' == get_post_type() ) : ?>
  23. <div class="entry-meta">
  24. <?php twentyeleven_posted_on(); ?>
  25. <?php
  26. /**
  27. * The template for displaying content in the single.php template
  28. *
  29. * @package WordPress
  30. * @subpackage Twenty_Eleven
  31. * @since Twenty Eleven 1.0
  32. */
  33. ?>
  34.  
  35. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  36. <header class="entry-header">
  37. <h1 class="entry-title"><?php the_title(); ?></h1>
  38.  
  39. <?php if ( 'post' == get_post_type() ) : ?>
  40. <div class="entry-meta">
  41. <?php twentyeleven_posted_on(); ?>
  42. <!-- <?php
  43. /* translators: used between list items, there is a space after the comma */
  44. $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  45.  
  46. /* translators: used between list items, there is a space after the comma */
  47. $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  48. if ( '' != $tag_list ) {
  49. $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
  50. } elseif ( '' != $categories_list ) {
  51. $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
  52. } else {
  53. $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
  54. }
  55.  
  56. printf(
  57. $utility_text,
  58. $categories_list,
  59. $tag_list,
  60. esc_url( get_permalink() ),
  61. the_title_attribute( 'echo=0' ),
  62. get_the_author(),
  63. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  64. );
  65. ?> -->
  66. </div><!-- .entry-meta -->
  67. <?php endif; ?>
  68. </header><!-- .entry-header -->
  69.  
  70. <div class="entry-content">
  71. <?php the_content(); ?>
  72. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  73. </div><!-- .entry-content -->
  74.  
  75. <footer class="entry-meta">
  76. <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  77.  
  78. <?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
  79. <div id="author-info">
  80. <div id="author-avatar">
  81. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
  82. </div><!-- #author-avatar -->
  83. <div id="author-description">
  84. <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
  85. <?php the_author_meta( 'description' ); ?>
  86. <div id="author-link">
  87. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  88. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
  89. </a>
  90. </div><!-- #author-link -->
  91. </div><!-- #author-description -->
  92. </div><!-- #author-info -->
  93. <?php endif; ?>
  94. </footer><!-- .entry-meta -->
  95. </article><!-- #post-<?php the_ID(); ?> -->
  96. </div><!-- .entry-meta -->
  97. <?php endif; ?>
  98.  
  99. <!-- <?php if ( comments_open() && ! post_password_required() ) : ?>
  100. </div>
  101. <?php endif; ?> -->
  102. </header><!-- .entry-header -->
  103.  
  104. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  105. <div class="entry-summary">
  106. <?php the_excerpt(); ?>
  107. </div><!-- .entry-summary -->
  108. <?php else : ?>
  109. <div class="entry-content">
  110. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
  111. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  112. </div><!-- .entry-content -->
  113. <?php endif; ?>
  114.  
  115. <footer class="entry-meta">
  116. <?php $show_sep = false; ?>
  117. <?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
  118. <?php
  119. /* translators: used between list items, there is a space after the comma */
  120. $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  121. if ( $categories_list ):
  122. ?>
  123. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  124. $show_sep = true; ?>
  125. <?php endif; // End if categories ?>
  126. <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
  127. <?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
  128. <?php
  129. /* translators: used between list items, there is a space after the comma */
  130. $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  131. if ( $tags_list ):
  132. if ( $show_sep ) : ?>
  133. <?php endif; // End if $show_sep ?>
  134. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  135. $show_sep = true; ?>
  136. </span>
  137. <?php endif; // End if $tags_list ?>
  138. <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
  139.  
  140. <?php if ( comments_open() ) : ?>
  141. <?php if ( $show_sep ) : ?>
  142. <?php endif; // End if $show_sep ?>
  143. <?php endif; // End if comments_open() ?>
  144. <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  145. </footer><!-- .entry-meta -->
  146. </article><!-- #post-<?php the_ID(); ?> -->