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

Thumbnail images are not displaying by blog excerpts on my blog at http://richardclunan.com/blog/ -- I found some code that I think I might need to add to functions.php to make this happen, and if I do need to do this, I'd like to know where in functions.php I should add the code...

In my twentyeleven files, in functions.php, it says:

// This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images add_theme_support( 'post-thumbnails' );

But the following code isn't in functions.php:

if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); }

If my understanding of this: http://codex.wordpress.org/Post_Thumbnails is correct, then maybe I have to add that code into functions.php to make thumbnails appear on my blog ...?

Where in the file functions.php would I add the code?

And I presume curly brackets } signify the end of lines of code -- so I guess I'd paste the code after a curly bracket somewhere?

share|improve this question
up vote 1 down vote accepted

Post thumbnails are enabled in the twenty-eleven theme by default. If it's not working either you have a plugin conflict, or someone has edited the functions.php file. Here is the section of the twenty-eleven functions.php file that should enable the post thumbnails:

add_theme_support( 'post-thumbnails' );

The code needs to be inside the function twentyeleven_setup() function to work.

share|improve this answer
I think it's safe to say you don't have to use if ( function_exists( anymore. This was used for backwards compatibility, but shouldn't be an issue in current WordPress versions. – Jeremy Jared Jan 29 '12 at 18:24

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.