Created
September 15, 2016 12:59
-
-
Save cpaul007/5e4b040019bcd49b4fead297885d6e57 to your computer and use it in GitHub Desktop.
Creating full width home page on Elegance Theme
This file contains hidden or 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
<?php | |
//* Do not add PHP opening tag. Copy the code below this line | |
add_action( 'genesis_header', 'elegance_header_wrapper_open', 4 ); | |
function elegance_header_wrapper_open() { | |
if( !is_front_page() ) | |
return; | |
echo '<div class="site-header-container"><div class="wrap">' . "\n"; | |
} | |
add_action( 'genesis_after_header', 'elegance_header_wrapper_close', 12 ); | |
function elegance_header_wrapper_close() { | |
if( !is_front_page() ) | |
return; | |
echo '</div></div>' . "\n"; | |
} |
This file contains hidden or 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
.home .site-container { | |
max-width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment