Created
April 29, 2014 19:58
-
-
Save wpsmith/fb7fb71511e7ede00c87 to your computer and use it in GitHub Desktop.
PHP: Force Full-Width for BuddyPress within Genesis
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 | |
add_action( 'get_header', 'gs_set_bp_profile_fw' ); | |
/** | |
* Make BuddyPress pages full width. | |
* | |
* @uses bp_current_component() Checks if current page is showing BuddyPress component. | |
*/ | |
function gs_set_bp_profile_fw() { | |
if ( function_exists( 'bp_current_component' ) && bp_current_component() ) { | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment