Currently im making new theme and had the idea of adding featured image in the admin side of wordpress, unfortunately its not working this is what i have tried

I have added this code in functions.php

add_theme_support( 'post-thumbnails');

i also tried to change it

add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages

after i refresh and log in to my admin panel and tried to create new post or page featured image is not displaying and

after my set up function which is ja_theme_setup this is my code

add_action('after-setup_theme','ja_theme_setup' );

and also i have tried to look at SCREEN OPTIONS but i dont have any availble checkbox related to featured image..Please help me guys

NOTE: My wp-config.php file debug options is set to true

define('WP_DEBUG', true); 

and yet i dont have any errors

  • Are you using after_setup_theme action?
    – cybmeta
    Jul 3 '15 at 7:35
  • yes after my setup function it do this since my function name is ja_theme_setup add_action('after-setup_theme','ja_theme_setup' ); Jul 3 '15 at 7:37
  • In that case, your code looks OK should work. Sorry, imposible to know wath is happening without a deeper investigation into your site. Try to disable all plugins to check if the problem is from some plugin or from your theme, so you can narrow down the source of the problem.
    – cybmeta
    Jul 3 '15 at 8:18
  • I've noticed a error in the action name, see my answer.
    – cybmeta
    Jul 3 '15 at 8:21
  • actually i dont have any plugin enable Jul 3 '15 at 8:21

You have misspelled the action hook name.


add_action( 'after-setup_theme', 'ja_theme_setup' );

Should be:

add_action( 'after_setup_theme', 'ja_theme_setup' );

The full code:

add_action( 'after_setup_theme', 'ja_theme_setup' );
function ja_theme_setup() {
    add_theme_support( 'post-thumbnails');

You need to go your wp-admin/post/ top right corner show "screen Options" click on this and

expand screen-option then click on Featured Image check box

Hope this help you..

  • i am not say you want add but just click on check box to show feature image in admin side.. have you got it ??? Jul 3 '15 at 8:15

Your code should work , but as it is not working the try the following things

add_theme_support( 'post-thumbnails');

Just put this code in functions.php , not within a function . Just put this code on the top of your functions.php file . If it is not working then try this plugin

Drag & Drop Featured Image

  • So are you saying that your functions.php already have that code , and then you have write it one more time inside your ja_theme_setup functions ? If it is true , then please remove any one of this either the code in functions.php or in your ja_theme_setup functions Jul 3 '15 at 8:15
  • in your answer you said that i will put this add_theme_support( 'post-thumbnails'); to functions.php file . what im saying is its already in the functions.php file not in any other file . please read my question carefully Jul 3 '15 at 8:17
  • It might be caching issue then , please try change your theme , after that reactivate your custom theme . Hope it works Jul 3 '15 at 8:25

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