Skip to content

Instantly share code, notes, and snippets.

@scottnix
Created August 3, 2012 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnix/3248716 to your computer and use it in GitHub Desktop.
Save scottnix/3248716 to your computer and use it in GitHub Desktop.
Insert Header Image in Thematic Child Theme
// sizing for custom header
// http://codex.wordpress.org/Custom_Headers
$headerargs = array(
'flex-width' => true,
'width' => 1140,
'flex-height' => true,
'height' => 250,
'default-image' => get_stylesheet_directory_uri() . '/images/header.png',
);
add_theme_support( 'custom-header', $headerargs );
// add custom image to Thematic Child Theme inside the #branding div in the header
function childtheme_add_header_image() { ?>
<img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
<?php }
add_action('thematic_header', 'childtheme_add_header_image', 6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment