Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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:

<?php
add_action( 'after_setup_theme', 'wpse27586_setup_theme' );
function wpse27586_setup_theme()
{
    add_custom_background();
    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
add comment

Your Answer

 
discard

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.