Jump to content
Sign in to follow this  
niccolo_tapparo

Carousel shows wrong thumbnails

Recommended Posts

niccolo_tapparo

Hi, I have just updated my blog to WordPress 3.1 and I have an issue with carousel. The carousel works on category slug and it prints last five posts. Permalinks and titles are ok, but the thumbnail is wrong. All posts in the carousel have the same thumbnail, which is the same thumbnail of the first post in the page (see the picture below). 1.png I fixed it by changing /section/carousel/section.carousel/section.carousel.php. I modified lines 145-147 from

<?php if(has_post_thumbnail()): ?>
			                              <?php the_post_thumbnail(array( $carousel_image_width, $carousel_image_height ),array( 'class' => 'list_thumb list-thumb' ));?>
								<?php else: ?>
to
<?php if(has_post_thumbnail($rpost->ID)): ?>
			                              <?php echo get_the_post_thumbnail($rpost->ID,array( $carousel_image_width, $carousel_image_height ),array( 'class' => 'list_thumb list-thumb' ));?>
								<?php else: ?>

Now, as you can see on the picture below, it works! 2.png I think that there was a conflict between multiple loops on the same page.

Share this post


Link to post
Share on other sites
sidianmsjones

This might work for my issue as well, but I'm hoping to see an admin resolution to it. Thanks for sharing this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×