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/ directoryRegister 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:
<?php if (class_exists('MultiPostThumbnails')
&& MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :
MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image'); endif; ?>
Requires: 2.9.2 or higher
Compatible up to: 3.2.1
Last Updated: 2011-11-10
Downloads: 23,285
Got something to say? Need help?