Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • EMRETHEAVIATOR
    Participant

    @emretheaviator

    The problem is solved. It was because of an old code I used to hide admin. Anyone needs to hide admin can use this link.


    EMRETHEAVIATOR
    Participant

    @emretheaviator

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


    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 );
Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar