Mushir

content.php

Jan 26th, 2014
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if ( is_search() || is_home() || is_category() || is_archive()  ) : // Display Excerpts for Search and Homepage ?>
  2.         <div class="entry-summary">
  3.             <!-- Conditional thumbnail for categories -->
  4. <div class="excerpt-thumb">
  5.     <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>
  6.         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  7.         <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignright'); ?>
  8.         </a>
  9.     <?php else :?>
  10.     <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  11.         <img class="alignright" src="<?php echo get_stylesheet_directory_uri(); ?>/images/<?php $category = get_the_category(); echo $category[0]->slug; ?>.png" />
  12.     </a>
  13.     <?php endif;?>
  14. </div>
  15.             <?php the_excerpt(); ?>
  16.         </div><!-- .entry-summary -->
RAW Paste Data