WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working in a plugin and in that plugin adding wordpress default editor(wp_editor)and adding functionality to save post with add media features.

Add media features is working absolutely fine and adding media to respective post, but i want to add image as a thumbnail but i am not able to add set featured image button to the add media button.

This is the code i am writing to add WordPress default editor:

wp_editor( $post_content , 'productinfoeditor', array(
'textarea_name' => 'product_info_content', 
'editor_class' => 'requiredField', 
'teeny' => true, 
'textarea_rows' => 14
) );

In function.php file

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

And saving post with:

$post = array();
$post['post_type'] = 'product';
$post['post_content'] = $product_info_content;
$post['post_author'] = $user_ID;
$post['post_status'] = 'publish';
$post['post_title'] = $product_title;
$post_id = wp_insert_post( $post );
share|improve this question

Your product post type should have support for thumbnail. See the codex for more info on supports.

share|improve this answer

Your Answer


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.