voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

Usage with NewsPaper WordPress Theme #85

Closed anasiqbalkhan closed 8 years ago

anasiqbalkhan commented 8 years ago

Hi, I am using NewsPaper WordPress theme

Hello, I used Multiple Most thumbnail Plugin to add multiple thumbnail for single post. In Module 6 I found this code which display the first thumbnail

<?php echo $this->get_image('td_100x70');?>

In theme documentation the way to show secondary thumbnail the code is

<?php if (class_exists('MultiPostThumbnails')) :
    MultiPostThumbnails::the_post_thumbnail(
        get_post_type(),
        'secondary-image'
    );
endif; ?>

I implemented the code but it display the same secondary thumbnail for all posts in Module 6. Example: If I have 5 posts in module 6 and only two have secondary thumbnails added but all five display the same secondary thumbnail image ( The latest one )

Screenshot: http://i.imgur.com/NbPlLqO.png Please tell me how can I use this plugin in NewsPaper theme.

chrisscott commented 8 years ago

Try passing the $post_id of the posts in that loop as the 3rd argument to MultiPostThumbnails::the_post_thumbnail().