Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Created April 29, 2014 19:58
Show Gist options
  • Save wpsmith/fb7fb71511e7ede00c87 to your computer and use it in GitHub Desktop.
Save wpsmith/fb7fb71511e7ede00c87 to your computer and use it in GitHub Desktop.
PHP: Force Full-Width for BuddyPress within Genesis
<?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