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.
multi-post-thumbnails directory to the /wp-content/plugins/ directoryIn your theme's functions.php register a new thumbnail for the post type you want it active for. If post_type is not set it defaults to post.
if (class_exists('MultiPostThumbnails')) {
new MultiPostThumbnails(
array(
'label' => 'Secondary Image',
'id' => 'secondary-image',
'post_type' => 'post'
)
);
}
Display the thumbnail in your theme. e.g. for loop templates (outside of the loop, the first argument to MultiPostThumbnails::the_post_thumbnail() will need to be the post type):
<?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?>
Requires: 2.9.2 or higher
Compatible up to: 3.5.1
Last Updated: 2013-4-24
Downloads: 54,566
3 of 19 support threads in the last two months have been resolved.
Got something to say? Need help?