0

I am currently working on a theme for a client and now just got into a problem: When I want to set an image (also existing/already uploaded images don't work) the editor just not accept it and don't set it as the post thumbnail for the post.

Any help would be appreciated.

EDIT: Here is an screenshot for the case that somebody didn't know, what I am talking about:

enter image description here

It's like this before and after the "change". So what's going on there?

Normal file upload is working.

0

I figured out it was because of an script that was delivered with the Options Framework. There was a little piece of code in my functions.php which caused wrong javascript to be loaded.

When you are having the same problem, be sure to search for something like wp_enqueue_media(); or something of the following script, comment out and try to upload a thumbnail.

if( function_exists( 'wp_enqueue_media' ) ){
    wp_enqueue_media();
} else {
    wp_enqueue_style('thickbox');
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
}

Thanks for all answers, though.

-1

You need to add support for thumbnails in your theme. So, put this in your theme files:

function custom_theme_setup() { add_theme_support( $feature, $arguments ); } add_action( 'after_setup_theme', 'custom_theme_setup' );

This enables the thumbnail/feature image support for all post types in your current theme including normal posts and pages.

5
  • I already have this in my code. – Dominik Schmidt Jun 9 '15 at 13:40
  • 1
    If Dominik had this not enabled it would not even be shown in the editor. – Charles Jun 9 '15 at 13:47
  • Try activating/deactivating your plugins to see if that is the case if not try another theme and then set the thumbnail. This will narrow down you issue. – TalwinderSingh Jun 9 '15 at 13:48
  • @Charles Agreed – TalwinderSingh Jun 9 '15 at 13:49
  • @TalwinderSingh I just posted an answer, where I solved it by myself. Thanks, though! – Dominik Schmidt Jun 11 '15 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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