Last active
August 29, 2015 14:10
-
-
Save pasadamedia/c383671e0c086f3324fa to your computer and use it in GitHub Desktop.
Add this snippit to the functions.php of your Genesis child theme to change to full width page layout and remove the sidebar.
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
// Remove sidebar and add new body class to front page. | |
add_action ( 'get_header', 'pasada_full_width'); | |
function pasada_full_width() { | |
if ( is_front_page() ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_filter ( 'body_class', 'pasada_test' ); | |
} | |
} | |
// Add body class. | |
function pasada_test( $classes ) { | |
$classes[] = 'full-width-content'; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment