Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have made a custom post type for a child theme. I removed "thumbnail" from the supports array in functions.php and that prevents a featured image meta box from being displayed. However, when in the "add an image" modal dialogue thing, there is still a "Use as featured image" link. Why, oh why? More to the point, does anyone know how to remove?

I tried...

remove_post_type_support( 'itinerary', 'post-thumbnail' );

...where itinerary is the name of my custom post type. Any help would be greatly appreciated!

Steve

share|improve this question
1  
see w4dev.com/wp/remove-featured-image-meta-box for a different approach which worked better for me. –  Pippa Aug 26 '12 at 1:28

3 Answers 3

up vote 5 down vote accepted

Some where in your theme you should have:

add_theme_support( 'post-thumbnails' );

Instead of removing support for a post type try only adding support for the post types you want:

add_theme_support( 'post-thumbnails', array( 'post', 'movie' ) );
share|improve this answer
    
great that worked! I added add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); to the child functions.php and called it by using this: add_action( 'init', 'mytheme_setup' ); function mytheme_setup() { add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); } so I didn't need to edit the parent theme :) Thanks for your help Brady! Steve –  Steve Jul 29 '11 at 12:44

To add to Brady's answer...

add_theme_support( 'post-thumbnails', array( 'post', 'movie' ) );

If you only want to add support to a single post type, keep the array() in the declaration. With debugging turned on, if you declare add_theme_support( 'post-thumbnails', 'post' ); wordpress will complain that it is expecting an array when on the post edit page. So to enable Featured Images to only posts...

add_theme_support( 'post-thumbnails', array( 'post' ) );

share|improve this answer

see http://w4dev.com/wp/remove-featured-image-meta-box/ for a different approach which worked better for me.

share|improve this answer
1  
Welcome to WordPress Answers! An answer should be more than just a link to an external site. Please add a solution. –  toscho Aug 26 '12 at 5:04
    
Could you explain why this worked better and include any relevant code snippets for posterity sake? –  Brian Fegter Sep 14 '12 at 20:48
    
Ho can I disable only a custom post type using this snippet? –  devo Jul 18 at 5:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.