Created
August 3, 2012 15:33
-
-
Save scottnix/3248716 to your computer and use it in GitHub Desktop.
Insert Header Image in Thematic Child Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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