Guest User

Untitled

a guest
Mar 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php /*
  2. Example template for use with post thumbnails
  3. Requires WordPress 2.9 and a theme which supports post thumbnails
  4. Author: mitcho (Michael Yoshitaka Erlewine)
  5. */ ?>
  6.  
  7.  
  8. <div id="related-post">
  9. <?php if ($related_query->have_posts()):?>
  10. <?php /*<h3>Related Articles</h3>*/ ?>
  11. <ul>
  12. <?php $i = 0; while ($related_query->have_posts()) : $related_query->the_post(); $i++; ?>
  13. <li<?php if($i == 4) { echo " class='last'"; } ?>>
  14. <div class="thumb"><a href="<?php the_permalink() ?>" onClick="recordOutboundLink(this, 'Popular', 'In Post Thumb','<?php echo $i;?>');return false;"><?php the_post_thumbnail('small'); ?></a></div>
  15. <span><a href="<?php the_permalink() ?>" onClick="recordOutboundLink(this, 'Popular', 'In Post Text','<?php echo $i;?>');return false;"><?php the_title(); ?></a></span>
  16. </li>
  17. <?php endwhile; ?>
  18. </ul>
  19.  
  20. <?php else: ?>
  21. <h3>No Related Articles</h3>
  22. <?php endif; ?>
  23. <div style="clear:both"></div>
  24. </div><!--related-->
Add Comment
Please, Sign In to add comment