Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirect to a custom tab


  • jennifersanchez
    Participant

    @jennifersanchez

    Hi.

    Im using this code to hide the tabs in the profile’s visitor

    function bpfr_hide_tabs() {
    global $bp;
    
    	
    
    	if( class_exists( 'bbPress' ) || bp_is_active ( 'groups' ) ) :
            
           
    	if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) {
    
          
    		bp_core_redirect( get_option('home') . '/members/' .  bp_core_get_user(). '/reviews' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    	bp_core_remove_nav_item( 'activity' );
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    but the line
    bp_core_redirect( get_option('home') . '/members/' . bp_core_get_user( ). '/reviews' ); dont works.
    i tried with this ('BP_DEFAULT_COMPONENT','reviews'); but this dont works..

    Thanks very much!!

  • You must be logged in to reply to this topic.
Skip to toolbar