Jetpack Top Posts Widget – Image problem
-
Hi,
I have problem with post images in top posts widget by Jetpack. Instead of featured image, widget is displaying some random picture from each post. I think that my theme causes this.
My theme contains also popular posts widget, however it is based on number of comments, not views. Thats why I use Jetpack. This is a widget code from my theme and it works correctly as it displays featured images near posts names.
ul class="post-thumb widget_posts clearfix"> <?php while ($query->have_posts()) : $query->the_post(); ?> <li class="item"> <?php if($show_thumb == 'yes'): ?> <div class="thumbnail"><a>"><?php the_post_thumbnail() ?></a></div> <?php endif; ?>
And if I understand it correctly, I am supposed to edit this code in Jetpack Widget plugin:
case 'list' : case 'grid' : wp_enqueue_style( 'widget-grid-and-list' ); foreach ( $posts as &$post ) { $image = Jetpack_PostImages::get_image( $post['post_id'] ); $post['image'] = $image['src'];
However, I’m not a developer, so I need a help.
Thanks
- The topic ‘Jetpack Top Posts Widget – Image problem’ is closed to new replies.