// 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!