Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="related">
- <h3>Related reading</h3>
- <ul>
- <div class="tab">
- <?php if ($related_query->have_posts()):?>
- <?php $l=1;?>
- <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
- <?php if (($l == 4) || ($l == 8)) {echo "<li class=\"last\">";} else{ echo "<li>";}?>
- <a href="<?php the_permalink() ?>">
- <?php if(has_post_thumbnail()) : the_post_thumbnail('related-thumb'); else: ?>
- <?php $images =& get_children( 'post_type=attachment&post_mime_type=image&post_parent=' . $post->ID ); if ($images) {$firstImageSrc = wp_get_attachment_image_src(array_shift(array_keys($images)), medium, false);
- echo "<img src=\"{$firstImageSrc[0]}\" width=\"137\" height=\"117\" alt=\"";the_title();echo "\">";}?><?php the_title(); ?><?php endif; ?></a></li>
- <?php $l++; ?>
- <?php endwhile; ?>
- </div><!--tab-->
- </ul>
- <?php else: ?>
- <p>No related posts.</p>
- <?php endif; ?>
- </div><!--related-->
Add Comment
Please, Sign In to add comment