@emretheaviator
7 years, 7 months ago
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.
Thank you very much. The problem is solved. Anyone has the same problem can use this link.
7 years, 10 months ago
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 );