Advertisement
vapvarun

Remove sidebar for BuddyPress pages for storefront

Apr 23rd, 2020
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1.  
  2. add_action( 'after_setup_theme', 'remove_storefront_sidebar', 9 );
  3. function remove_storefront_sidebar(){
  4.     if ( bp_current_component() && bp_is_user() ){
  5.         remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
  6.     }
  7.    
  8. }
  9. add_filter( 'body_class', function( $classes ) {
  10.     if ( bp_current_component() && bp_is_user()){
  11.     return array_merge( $classes, array( 'storefront-full-width-content' ) );
  12.     }
  13. } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement