Advertisement
alchymyth

content.php wt thumbnail 2011

Dec 7th, 2012
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.85 KB | None | 0 0
  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.  
  13.             <?php if( has_post_thumbnail($post->ID) ) { ?>
  14.             <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
  15.             <?php } ?>
  16.  
  17.         <header class="entry-header">
  18.             <?php if ( is_sticky() ) : ?>
  19.                 <hgroup>
  20.                     <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  21.                     <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
  22.                 </hgroup>
  23.             <?php else : ?>
  24.             <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  25.             <?php endif; ?>
  26.  
  27.             <?php if ( 'post' == get_post_type() ) : ?>
  28.             <div class="entry-meta">
  29.                 <?php twentyeleven_posted_on(); ?>
  30.             </div><!-- .entry-meta -->
  31.             <?php endif; ?>
  32.  
  33.         <!--    <?php if ( comments_open() && ! post_password_required() ) : ?>
  34.             <div class="comments-link">
  35.                 <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
  36.             </div>
  37.             <?php endif; ?>  --!>
  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">&rarr;</span>', 'twentyeleven' ) ); ?>
  47.             <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  48.         </div><!-- .entry-content -->
  49.         <?php endif; ?>
  50.  
  51.         <footer class="entry-meta">
  52.             <?php $show_sep = false; ?>
  53.             <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  54.             <?php
  55.                 /* translators: used between list items, there is a space after the comma */
  56.                 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  57.                 if ( $categories_list ):
  58.             ?>
  59.             <span class="cat-links">
  60.                 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  61.                 $show_sep = true; ?>
  62.             </span>
  63.             <?php endif; // End if categories ?>
  64.             <?php
  65.                 /* translators: used between list items, there is a space after the comma */
  66.                 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  67.                 if ( $tags_list ):
  68.                 if ( $show_sep ) : ?>
  69.             <span class="sep"> | </span>
  70.                 <?php endif; // End if $show_sep ?>
  71.             <span class="tag-links">
  72.                 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  73.                 $show_sep = true; ?>
  74.             </span>
  75.             <?php endif; // End if $tags_list ?>
  76.             <?php endif; // End if 'post' == get_post_type() ?>
  77.  
  78.             <?php if ( comments_open() ) : ?>
  79.             <?php if ( $show_sep ) : ?>
  80.             <span class="sep"> | </span>
  81.             <?php endif; // End if $show_sep ?>
  82.             <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  83.             <?php endif; // End if comments_open() ?>
  84.  
  85.             <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  86.         </footer><!-- #entry-meta -->
  87.     </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement