Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h3> Related Posts</h3>
- <?php if ($related_query->have_posts()):?>
- <ul class="related-posts">
- <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
- <li class="echo (($oddeven == 'even') ? 'odd' : 'even'); ?>"> <?php $postimageurl = get_post_meta($post->ID, 'image', true); if ($postimageurl) { ?>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/thumb.php?src=<?php echo $postimageurl; ?>&h=150&w=300&zc=1&q=100" alt="<?php the_title(); ?>" width="300" height="150"/><br /></a>
- <?php } else { ?>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/thumb.php?src=<?php bloginfo('stylesheet_directory'); ?>/default.jpg&h=100&w=100&zc=1&q=100" alt="<?php the_title(); ?>" width="200" height="100"/></a>
- <?php } ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
- <p class="post_meta"><span class="details"><?php _e('Archived in ', 'woothemes' ); ?> <?php the_category(', ') ?></span></p></li>
- <?php endwhile; ?>
- </ul>
- <?php else: ?>
- <p>No related posts.</p>
- <?php endif; ?>
- styles for this:
- .related-posts li.odd { float:left; width: 50%; clear:left; }
- .related-posts li.even { float:left; width: 50%; }
- .clear-list { float:none; clear: both; display:block; visibility: hidden; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement