wpexplorer

Classy - Related 2

Oct 4th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. <?php if ( has_post_thumbnail() ) { ?>
  2.             <div class="related-post clearfix">
  3.                 <div class="grid_2 alpha">
  4.                         <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('small-thumbnail'); ?></a>
  5.                 </div>
  6.                 <!-- END .grid_2 alpha -->
  7.                 <div class="grid_15 omega">
  8.                         <h4><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>  
  9.                         <p><?php echo excerpt(13); ?></p>
  10.                 </div>
  11.                 <!-- END .grid_15 omega -->
  12.             </div>
  13.             <!-- END .related-post -->            
  14.             <?php } ?>
  15.         <?php
  16.         //show related item without featured image
  17.         else { ?>
  18.         <div class="related-post clearfix">
  19.             <h4><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>  
  20.                         <p><?php echo excerpt(13); ?></p>
  21.             </div>
  22.             <!-- END .related-post -->  
  23.  
  24.         <?php } ?>
  25.  
Advertisement
Add Comment
Please, Sign In to add comment