Title: [Plugin: Multiple Post Thumbnails] Image not displaying
Last modified: August 19, 2016

---

# [Plugin: Multiple Post Thumbnails] Image not displaying

 *  Resolved [zeckdude](https://wordpress.org/support/users/zeckdude/)
 * (@zeckdude)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/)
 * I can get the Secondary Image Upload box to show up in the admin area, but I 
   can’t manage to get the image to display on the page.
 * This is the code I am using to try and make it display (From: [http://wordpress.org/extend/plugins/multiple-post-thumbnails/installation/](http://wordpress.org/extend/plugins/multiple-post-thumbnails/installation/)):
 *     ```
       <?php if (class_exists('MultiPostThumbnails')
           && MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :
               MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image'); endif; ?>
       ```
   
 * I tried adding a random echo inside the if statement to see if it gets hit, but
   it doesn’t echo out, so i’m guessing somehow the condition is not being met?
 * What am I missing?

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/?output_format=md)
2

 *  [themagiclaundry](https://wordpress.org/support/users/themagiclaundry/)
 * (@themagiclaundry)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/page/2/#post-1614636)
 * i’ve read a couple posts and i tried many various versions of codes. Here is 
   what i have so far in my functions.php
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * and heres what i have in my page.php
 *     ```
       <?php if (class_exists('MultiPostThumbnails')
           && MultiPostThumbnails::has_post_thumbnail('page', 'image2')) :
           MultiPostThumbnails::the_post_thumbnail('page', 'image2', NULL, 'post-image2-thumbnail');
           endif; ?>
   
       <?php if (class_exists('MultiPostThumbnails')
           && MultiPostThumbnails::has_post_thumbnail('page', 'image3')) :
               MultiPostThumbnails::the_post_thumbnail('page', 'image3', NULL, 'post-image3-thumbnail');
       endif; ?>
       ```
   
 * i’m new to wordpress and php. i spent many hours doing trial and errors but nothing
   worked and would love some guidance. thanks
 *  [flick](https://wordpress.org/support/users/mosey/)
 * (@mosey)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/page/2/#post-1614637)
 * I have slightly different code for functions.php but the template (page.php) 
   code looks similar. This is what I have in functions.php and it does work:
 * [http://pastebin.com/EqmXQR7i](http://pastebin.com/EqmXQR7i) [Edited to use Pastebin–
   thanks mods]
 * I have associated my thumbnails with a custom post type called ‘project’ but 
   typically it would be page or post.
 * Everyone starts somewhere – I’m still learning too!
 *  [themagiclaundry](https://wordpress.org/support/users/themagiclaundry/)
 * (@themagiclaundry)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/page/2/#post-1614638)
 * just tried to copy and paste that code and changed ‘project’ to ‘post’ and no
   luck. the picture will display in the editor, but when i refresh the site. theres
   no pictures there. i’m using this in conjunction with the wp-creativx theme. 
   heres my old site, which sucks but is live now. [http://themagiclaundry.com](http://themagiclaundry.com)
   and the new site that i’m trying to put up is [http://themagiclaundry.com/blog](http://themagiclaundry.com/blog)
   if you notice the 3 picture thats on there now are from 3 separate empty posts
   with just the “featured” custom field filled out.
 *  [flick](https://wordpress.org/support/users/mosey/)
 * (@mosey)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/page/2/#post-1614639)
 * [http://pastebin.com/FXmFpHmQ](http://pastebin.com/FXmFpHmQ)
 * This is what I have in single.php, but I note that you’re using ‘post’ on the
   functions.php one but ‘page’ in the template part?
 * Very nice looking site btw 🙂

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/?output_format=md)
2

The topic ‘[Plugin: Multiple Post Thumbnails] Image not displaying’ is closed to
new replies.

 * 19 replies
 * 10 participants
 * Last reply from: [flick](https://wordpress.org/support/users/mosey/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-image-not-displaying/page/2/#post-1614639)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
