Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Hide Admin from Members and Activity

Viewing 3 replies - 1 through 3 (of 3 total)

  • EMRETHEAVIATOR
    Participant

    @emretheaviator

    In short I need this code to redirect to 404 page not homepage. Thank you.

    // deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    	global $bp; 
    	if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    		wp_redirect( home_url() );
    	exit;
    	endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );

    WPisGOOD
    Participant

    @wpisgood

    Excellent solution from @livingflame

    The Link: SOLUTION


    EMRETHEAVIATOR
    Participant

    @emretheaviator

    Thank you very much. The problem is solved. Anyone has the same problem can use this link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Hide Admin from Members and Activity’ is closed to new replies.
Skip to toolbar