[Plugin: Multiple Post Thumbnails] displaying secondary featured images
-
I really think this would be an excellent plug-in if I could get it to work.
I want to display 3 Featured Images in one page with different sizes. This is what I’ve put in functions.php:
add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 588, 392, true ); $thumb2 = new MultiPostThumbnails(array( 'label' => 'Secondary Image', 'id' => 'image2', 'post_type' => 'page' ) ); add_image_size('post-image2-thumbnail', 180, 180, true); $thumb3 = new MultiPostThumbnails(array( 'label' => 'Tertiary Image', 'id' => 'image3', 'post_type' => 'page' ) ); add_image_size('post-image3-thumbnail', 180, 180, true);
And this is what I’ve put in page.php to call the second and third thumbnails/featured images:
<?php if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('page', 'post-image2-thumbnail')) : MultiPostThumbnails::the_post_thumbnail('page', 'post-image2-thumbnail'); endif; ?> <?php if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('post', 'post-image3-thumbnail')) : MultiPostThumbnails::the_post_thumbnail('post', 'post-image3-thumbnail'); endif; ?>
Unfortunately this does not work ??
I would love to work this out as I think it would be so useful for people who don’t or can’t re-size images.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘[Plugin: Multiple Post Thumbnails] displaying secondary featured images’ is closed to new replies.