Created
November 28, 2014 06:37
-
-
Save pasadamedia/c55ebb0e9065d740289a to your computer and use it in GitHub Desktop.
Disable sidebar on WooCommerce login page.
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
/** | |
* Disable sidebar on WooCommerce login page. | |
* | |
*/ | |
function pasada_wc_login_page_remove_sidebar() { | |
if ( is_account_page() && !is_user_logged_in() ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_filter( 'body_class', 'pasada_full_width_page_body_class' ); | |
} | |
} | |
add_action( 'get_header', 'pasada_wc_login_page_remove_sidebar' ); | |
//* Add body class to make login page full width. | |
function pasada_full_width_page_body_class( $classes ) { | |
$classes[] = 'full-width-page'; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment