finalwebsites

yarpp-template

Feb 1st, 2012
141
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if ($related_query->have_posts()) { ?>
  2. <h3>Related Posts</h3>
  3. <ul id="myRelatedPosts">
  4.     <?php while ($related_query->have_posts()) {
  5.         $related_query->the_post(); ?>
  6.     <li>
  7.         <?php if (has_post_thumbnail()) { ?>
  8.         <a href="<?php the_permalink() ?>" class="relthumb">
  9.             <?php the_post_thumbnail(); ?>
  10.         <?php } else { ?>
  11.             <a href="<?php the_permalink() ?>" class="relthumb"><img src="<?php bloginfo('template_url') ?>/images/default.jpg" alt="blog post" /></a>
  12.         <?php } // end if/else thumbnail ?>
  13.         <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><?php echo create_short_version(get_the_excerpt(), 60); ?></li>
  14.     <?php } // end while ?>
  15. </ul>
  16. <?php } // end if/else having posts ?>
RAW Paste Data