Multiple Post Thumbnails
[resolved] Display thumbnails outside loop (4 posts)

  1. miniCarl
    Posted 4 years ago #

    This is regarding the Multiple post thumbnails plugin.

    Is it possible to show thumbnails outside the loop?
    Providing a post id (or slug?), of course.


  2. brubrant
    Posted 4 years ago #

    I got it Working outside the loop!

    I used this code:

    global $wp_query;
    $thePostID = $wp_query->post->ID;
    <?php if (class_exists('MultiPostThumbnails')
    					&& MultiPostThumbnails::has_post_thumbnail('page', 'header-interna', $thePostID)) :
    					MultiPostThumbnails::the_post_thumbnail('page', 'header-interna', $thePostID, 'header-interna-post'); endif; ?>
  3. brubrant
    Posted 4 years ago #

    In my case:

    page = post type I desire
    header-interna = new thumbnail I created with the plugin
    header-interna-post = thumbnail size I created.

  4. darinroman
    Posted 4 years ago #

    Thank you @brubrant for this...I've been looking for a few days and finally came across this thread. Here is what I was able to accomplish with your solution: http://wordpress.org/support/topic/plugin-multiple-post-thumbnails-secondary-thumbnail-not-showing

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple Post Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic