Created
November 17, 2013 05:58
-
-
Save srikat/7509858 to your computer and use it in GitHub Desktop.
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
//* Add support for structural wraps | |
add_theme_support( 'genesis-structural-wraps', array( | |
'header', | |
'nav', | |
'subnav', | |
'site-inner', | |
'footer-widgets', | |
'footer', | |
'header-image' | |
) ); | |
add_action ( 'genesis_before_header', 'sk_add_header_image' ); | |
function sk_add_header_image() { | |
printf( '<div %s>', genesis_attr( 'header-image' ) ); | |
genesis_structural_wrap( 'header-image' ); | |
$header_image = sprintf( '<a href="%s" title="%s"><img src="'. get_stylesheet_directory_uri() .'/images/header.jpg" title="%s" alt="%s"/></a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ) ); | |
echo $header_image; | |
genesis_structural_wrap( 'header-image', 'close' ); | |
echo '</div>'; | |
} |
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
.header-image { | |
margin-top: 4rem; | |
margin-bottom: 4rem; | |
text-align: center; | |
} | |
.header-image img { | |
margin-bottom: 0; | |
vertical-align: top; | |
} | |
@media only screen and (max-width: 320px) { | |
.header-image { | |
margin-top: 2rem; | |
margin-bottom: 2rem; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment