Adding a Secondary Thumbnail
-
I have a Feature image showing in each post, as well as the thumbnail in the category list.
I’d like to add a secondary image that would show up as the thumbnail only in the category list.
So I would be able to set 2 different images for each post, one for the thumbnail and one as the main for the single post.I thought I could make this work with “Multiple Post Thumbnail plugin”.
By adding…
if (class_exists(‘MultiPostThumbnails’)) {
new MultiPostThumbnails(array(
‘label’ => ‘Thumbnail Image – 135 x 125’,
‘id’ => ‘secondary-image’,
‘post_type’ => ‘post’
) );
-> in functions.phpand adding ….
<?php if (class_exists(‘MultiPostThumbnails’)) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), ‘secondary-image’); endif; ?>
-> where I would like it to show up.I was able to assign a secondary image for each post in admin. But this secondary image doesn’t show in the widget output.
Can you point me in the right direction as to where I can add the “MultiPostThumbnails” output code in your widget php files in order for it to simply just show up?
Or if you have a better solution that would be much appreciated.
https://www.ads-software.com/plugins/wp-category-posts-list/
- The topic ‘Adding a Secondary Thumbnail’ is closed to new replies.