Remove feature image from custom post type wordpress
function remove_image_box() {
if ($current_user->user_level < 10){
remove_meta_box('postimagediv','your_custom_post_type','side');
}
}
add_action('do_meta_boxes', 'remove_image_box');
Written by fabax
Related protips
1 Response
When registering a custom post type, you should set the 'supports' argument. If you don't want featured images, make sure the supports array doesn't contain 'thumbnail'
See this codex page, http://codex.wordpress.org/Function_Reference/register_post_type, and look for the supports argument (it'll explain it better than I can!)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#