WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. miniCarl
    Member
    Posted 2 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.

    http://wordpress.org/extend/plugins/multiple-post-thumbnails/

  2. brubrant
    Member
    Posted 2 years ago #

    I got it Working outside the loop!

    I used this code:

    <?php
    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
    Member
    Posted 2 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
    Member
    Posted 2 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

About this Topic