Title: [Plugin: Custom Content Type Manager] help about thumbnail
Last modified: August 20, 2016

---

# [Plugin: Custom Content Type Manager] help about thumbnail

 *  Resolved [thebuded](https://wordpress.org/support/users/thebuded/)
 * (@thebuded)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/)
 * Hi, I’m new to php so I followed your Overview video and on a movie page it successfully
   returned a lists of actors. but I also want to have the actors thumbnail to appear
   on the page, is this doable?
 * Also on actors’ page, I want to return a list of movies with thumbnail the actor
   acted in (this part is automatic without having me put in movies custom fields
   in the actor page.)
 * Thank You.
 * [http://wordpress.org/extend/plugins/custom-content-type-manager/](http://wordpress.org/extend/plugins/custom-content-type-manager/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882326)
 * Yes, it’s possible, it just requires a bit more footwork to get the thumbnail.
   You can use the wp_get_attachment_image_src() or the wp_get_attachment_image()
   functions to retrieve an image given its ID, or try get_the_post_thumbnail().
   If you are getting a list of actors, the thumbnail ID is stored inside a hidden
   field named “_thumbnail_id” — that ID is what you want to pass to the WP functions.
   If you’ve stored the thumbnail as a custom field and NOT as the default WP “featured-
   image”, then you’d use the custom field name to retrieve the ID.
 * Re retrieving a list of movies featuring a given value, see the [http://code.google.com/p/wordpress-custom-content-type-manager/wiki/TemplateFunctions](http://code.google.com/p/wordpress-custom-content-type-manager/wiki/TemplateFunctions)
   page, specifically this function:
    [http://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts_sharing_custom_field_value](http://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts_sharing_custom_field_value)
 *  Thread Starter [thebuded](https://wordpress.org/support/users/thebuded/)
 * (@thebuded)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882354)
 * Hi, Thank you, but it would be awesome if you could provide some working sample
   code. no worries if you’re busy.
 * Thank You.
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882362)
 * Ha. I’m *always* busy. Check the FAQ, some sample code is there: [http://code.google.com/p/wordpress-custom-content-type-manager/wiki/FAQ](http://code.google.com/p/wordpress-custom-content-type-manager/wiki/FAQ)
 *  Thread Starter [thebuded](https://wordpress.org/support/users/thebuded/)
 * (@thebuded)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882373)
 * Ok I got it working.
 * Thanks again for this great plugin!
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882374)
 * Great! If you’d like to share your code, I’ll post it on the Wiki for the benefit
   of others.
 *  Thread Starter [thebuded](https://wordpress.org/support/users/thebuded/)
 * (@thebuded)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882375)
 * Hi sure
 *     ```
       <?php
       $actor_thumb = get_custom_field('Actors:to_array', 'get_post');
       foreach ($actor_thumb as $at) {
       $thumbpermalink = get_permalink( $at['ID'] );
       $thumb = wp_get_attachment_image_src($at['_thumbnail_id']);
       ?>
       <a href="<?php echo $thumbpermalink ?>" title="<?php echo $at['post_title']; ?>" >
       <img src="<?php echo $thumb[0]; ?>" width="100" height="150">
       </a>
       <?php
       }
       ?>
       ```
   
 * I only need the first part of my problem, second part I will use another plugin
   called “List category posts”, it have some options best suits my needs.
 *  [paulie22](https://wordpress.org/support/users/paulie22/)
 * (@paulie22)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882503)
 * how to access a specific image sizing for an image field in CCTM:
 * add to functions:
 *     ```
       add_image_size( 'contenttype-thumb', 216, 9999 );  // 216 is the width, set to whatever, 9999 is ignored (or swap to set height)
       add_theme_support( 'post-thumbnails', array( 'contenttype' ) );
       ```
   
 * add to template page within loop:
 *     ```
       <?php
       global $post;
       $fieldname = 'large_poster';  //the image field name
       $image_id = get_post_meta($post->ID, $fieldname, true);
       $images = wp_get_attachment_image_src( $image_id, 'contenttype-thumb', true); 
   
       echo $images[0];
       ?>
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: Custom Content Type Manager] help about thumbnail’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-type-manager_c9c790.
   svg)
 * [Custom Content Type Manager](https://wordpress.org/plugins/custom-content-type-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-content-type-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-type-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-type-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-type-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-type-manager/reviews/)

## Tags

 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 7 replies
 * 3 participants
 * Last reply from: [paulie22](https://wordpress.org/support/users/paulie22/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-help-about-thumbnail/#post-2882503)
 * Status: resolved