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'm searching through the twenty-eleven theme's source files (functions.php and theme-options.php) attempting to get some clues on how to implement the upload utility found on several of the theme options pages. However, I can't find any reference to it.

Anyone know which file its contained in?

share|improve this question
up vote 2 down vote accepted

for the custom background, you'd call add_custom_background, for the cool header image things, it's add_custom_image_header. You need to hook both those into something like after_setup_theme:

add_action( 'after_setup_theme', 'wpse27586_setup_theme' );
function wpse27586_setup_theme()
    add_custom_image_header( 'some_callback_for_front', 'some_callback_for_admin' );

Add custom image header is more complex than it seems, so take a look in Twenty Eleven's functions.php file inside the function twentyeleven_setup, which starts around line 75, for some how to. The code is very well commented.

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.