Post Image Plugin and Multiple Loops
-
Hi, i can’t figure out how to use Kaf’s Post Image Plugin with multiple loops. I’m trying to use it in my archives to display the 6 newest in category like this:
thumb thumb thumb
title title titlethumb thumb thumb
title title titleTo format the divs into 2 rows properly i need to have 2 loops to display 3 posts each (so i can put a clear:both call in between rows). I can get the first row of three to display perfectly. The second row works somewhat, in that the title and permalinks all are correct, but the post-image plugin displays the default image instead of the actual thumbnail for the post.
Any help would be extremely appreciated.
Here is my code for the two loops:
<?php
$posts = query_posts($query_string .
'&order=desc&posts_per_page=3');
?>
<?php while (have_posts()) : the_post(); ?>
<div id="theblock">
<strong><div class="picbox"><a href="<?php the_permalink(); ?>"><img src="<?php post_image('https://default.com/imagelink.jpg', true, false); ?>" alt="<?php the_title(); ?>"/></a></div>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></strong>
<small><?php the_time('F j, Y'); ?></small>
</div>
<?php endwhile; ?>
<br class="clearboth" />
<?php rewind_posts(); ?>
<?php
$posts = query_posts($query_string .
'&order=desc&posts_per_page=3&offset=3');
?>
<?php while (have_posts()) : the_post(); ?>
<div id="theblock">
<strong><div class="picbox"><a href="<?php the_permalink(); ?>"><img src="<?php post_image('https://default.com/imagelink.jpg', true, false); ?>" alt="<?php the_title(); ?>"/></a></div>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></strong>
<small><?php the_time('F j, Y'); ?></small>
</div>
<?php endwhile; ?>
Thank You!
- The topic ‘Post Image Plugin and Multiple Loops’ is closed to new replies.