Title: [Plugin: Multiple Post Thumbnails] Custom Post Type / Plugin / Code Questions
Last modified: August 19, 2016

---

# [Plugin: Multiple Post Thumbnails] Custom Post Type / Plugin / Code Questions

 *  [Jamie O](https://wordpress.org/support/users/idealien/)
 * (@idealien)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-custom-post-type-plugin-code-questions/)
 * Fantastic plugin! I am trying to leverage it as a part of a custom post type (
   to store for display a series of rotating banners) and have run into a couple
   of questions that I need clarification on. Most relate to the fact that previous
   code examples are for themes vs plugins I think.
 * **Where to run MultiPostThumbnails definition for plugin?**
    If I add the following
   to my theme functions.php file it works properly:
 *     ```
       $thumbEN = new MultiPostThumbnails(array(
            'label' => 'English Banner (740x200)',
            'id' => 'english-banner',
            'post_type' => 'banners'
       ));
       ```
   
 * However when I add that as a part of my plugin init call that is attached to 
   the init action – where I run register_post_type, add_image_size – it causes 
   the odd behaviour of none of my media library images to be visible to select 
   to use as featured image. I can see the count of # of images in the library, 
   but none of the table below it.
 * **How to remove the default featured image selector?**
    If I create the post 
   type with ‘thumbnail’ as a part of the supports array, everything works fine.
   If I create it without, when I click on the set link (“Set English Banner (740
   ×200)” from example above), the media selector does not load as a pop-up but 
   as a new page that no longer can return the result to the admin window. The same
   is true if I try to use a remove_meta_box on the default featured image meta 
   box – postimagediv.
 * **Can you add context to the paramaters for MultiPostThumbnails?**
    This calls
   your add_meta_box function which has the context hard-coded as ‘side’. You’ve
   exposed priority as a parameter already, is there any reason that context could
   not be?

The topic ‘[Plugin: Multiple Post Thumbnails] Custom Post Type / Plugin / Code Questions’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multiple-post-thumbnails_d94965.svg)
 * [Multiple Post Thumbnails](https://wordpress.org/plugins/multiple-post-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-post-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-post-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-post-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-post-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-post-thumbnails/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jamie O](https://wordpress.org/support/users/idealien/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-multiple-post-thumbnails-custom-post-type-plugin-code-questions/)
 * Status: not resolved