Skip to:
Content
Pages
Categories
Search
Top
Bottom

Denying access to admins profile, DanBP’s code


  • Mickey
    Participant

    @minglonaire

    // 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 );

    Hello, instead of home_url I would like it to redirect to a specific page on my site, when I insert that page, “http://mysite.com/contact” in place of home_url it doesnt work. What should I be putting there?

    Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Denying access to admins profile, DanBP’s code’ is closed to new replies.
Skip to toolbar