Advertisement
Digitalraindrops

content-excerpt.php

Sep 4th, 2011
1,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.07 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying content thumbnail and excerpt
  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.            
  14.             <h3 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></h3>
  15.            
  16.             <?php if ( 'post' == get_post_type() ) : ?>
  17.             <div class="entry-meta">
  18.                 <?php twentyeleven_posted_on(); ?>
  19.             </div><!-- .entry-meta -->
  20.             <?php endif; ?>
  21.  
  22.             <?php if ( comments_open() && ! post_password_required() ) : ?>
  23.             <div class="comments-link">
  24.                 <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
  25.             </div>
  26.             <?php endif; ?>
  27.         </header><!-- .entry-header -->
  28.  
  29.         <div class="entry-summary">
  30.             <?php if( has_post_thumbnail()) : ?>
  31.             <div class="alignleft" style="margin-right: 1em;">
  32.                 <?php the_post_thumbnail('thumbnail'); ?>
  33.             </div>
  34.             <?php endif; ?>
  35.             <?php the_excerpt(); ?>
  36.         </div><!-- .entry-summary -->
  37.  
  38.         <footer class="entry-meta">
  39.             <?php $show_sep = false; ?>
  40.             <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  41.             <?php
  42.                 /* translators: used between list items, there is a space after the comma */
  43.                 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  44.                 if ( $categories_list ):
  45.             ?>
  46.             <span class="cat-links">
  47.                 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  48.                 $show_sep = true; ?>
  49.             </span>
  50.             <?php endif; // End if categories ?>
  51.             <?php
  52.                 /* translators: used between list items, there is a space after the comma */
  53.                 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  54.                 if ( $tags_list ):
  55.                 if ( $show_sep ) : ?>
  56.             <span class="sep"> | </span>
  57.                 <?php endif; // End if $show_sep ?>
  58.             <span class="tag-links">
  59.                 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  60.                 $show_sep = true; ?>
  61.             </span>
  62.             <?php endif; // End if $tags_list ?>
  63.             <?php endif; // End if 'post' == get_post_type() ?>
  64.  
  65.             <?php if ( comments_open() ) : ?>
  66.             <?php if ( $show_sep ) : ?>
  67.             <span class="sep"> | </span>
  68.             <?php endif; // End if $show_sep ?>
  69.             <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>
  70.             <?php endif; // End if comments_open() ?>
  71.  
  72.             <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  73.         </footer><!-- #entry-meta -->
  74.     </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement