Last active
August 29, 2015 13:55
-
-
Save srikat/8693193 to your computer and use it in GitHub Desktop.
Adding a wide header in Agency Pro. http://sridharkatakam.com/add-wide-header-agency-pro/
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
//* Remove the default header | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
//* Add custom header | |
add_action( 'genesis_header', 'sk_do_header' ); | |
function sk_do_header() { | |
echo '<div class="my-header-image"><a href="http://genesis.dev/"><img src="http://genesis.dev/wp-content/uploads/2014/01/header.jpg" /></a></div>'; | |
genesis_markup( array( | |
'html5' => '<aside %s>', | |
'xhtml' => '<div class="widget-area header-widget-area">', | |
'context' => 'header-widget-area', | |
) ); | |
do_action( 'genesis_header_right' ); | |
add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); | |
add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); | |
dynamic_sidebar( 'header-right' ); | |
remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); | |
remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); | |
genesis_markup( array( | |
'html5' => '</aside>', | |
'xhtml' => '</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
/* Wide header | |
--------------------------------- */ | |
.site-container { | |
padding-top: 0; | |
} | |
.site-header { | |
position: static; | |
background-color: transparent; | |
} | |
.site-header img { | |
vertical-align: top; | |
margin-bottom: 0; | |
} | |
.site-header .wrap { | |
position: relative; | |
max-width: 1220px; | |
} | |
.site-header .widget-area { | |
position: absolute; | |
right: 10px; | |
top: 10px; | |
width: auto; | |
} | |
.site-inner { | |
padding: 3% 0; | |
} | |
.genesis-nav-menu a { | |
color: #282828; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment