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 using add_theme_support( 'custom-header', $defaults ); to support custom header images in my theme. The $defaults are described in the Custom Headers article

$defaults = array(
    'default-image'          => '',
    'random-default'         => false,
    'width'                  => 0,
    'height'                 => 0,
    'flex-height'            => false,
    'flex-width'             => false,
    'default-text-color'     => '',
    'header-text'            => true,
    'uploads'                => true,
    'wp-head-callback'       => '',
    'admin-head-callback'    => '',
    'admin-preview-callback' => '',

There is no explanation in the Codex for the following. What do they mean?

  • wp-head-callback
  • admin-head-callback
  • admin-preview-callback
share|improve this question

Those are name of callback function which would be enabled for custom header.

For example: if custom_function is assigned to 'wp-head-callback' then, there would be an action call like:


custom_function is the function you need to define.

share|improve this answer
Hi @Nilambar - thanks, I am aware of how callbacks work. I should have asked what is the point of having these callbacks? What should these callbacks actually do? – henrywright Jun 19 '14 at 11:10
ok :-). That is the feature given by WP for us to extend to our imagination. Lets say, we want to animate or ease the image on hover of header image, then those scripts could be placed in the callback function. Just my poor imagination. :D – Nilambar Jun 19 '14 at 11:15
Why would I use wp-head-callback over admin-head-callback or admin-preview-callback? What's the difference? – henrywright Jun 19 '14 at 12:35
wp_head is related with frontend template whereas admin_head is for admin side. They are pretty different. – Nilambar Jun 19 '14 at 17:41

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.