add_theme_support(‘custom-header’) does not add the option to customize

I am using this to get custom header support to my new theme:

function my_add_header_support() {
    $ch_defaults = array(
                         'default-text-color'     => '',
                         'default-image'          => '',
                         );
    add_theme_support( 'custom-header', $ch_defaults );
}
add_action( 'after_setup_theme', 'my_add_header_support' );

I expected a headers section to show up under Appearance – Customize in the dashboard, but it does not. There is a previous post about the same problem (theme development – add_theme_support( ‘custom-header’ ) does not add option menu in dashboard – WordPress Development Stack Exchange). I think it says that support for this should show up in WP 3.4.

Read More

What am I missing?

Related posts

Leave a Reply

1 comment

  1. From the array above, I think you just left out “uploads”. And if you’re wanting to be able to upload headers in the admin panel, it’s good to include the “width” and “height” in the array as well.

    $chargs = array(
        'width' => 980,
        'height' => 60,
        'default-text-color' => '',
        'default-image' => '',
        'uploads' => true,
    );
    add_theme_support( 'custom-header', $chargs );