Reply To: Buttons + Tabs Loading Whole Site Into Template
Ok, I’ve found that it is tied to my redirect function mentioned in https://buddypress.org/support/topic/only-administrator-can-change-avatar/. I’ll repeat it here for posterity:
// keep the 'normies' out of the admin
add_action( 'admin_init', 'custom_admin_init', 1 );
function custom_admin_init() {
if ( is_user_logged_in() && ! current_user_can( 'administrator' ) ) {
wp_redirect( home_url() ); die();
}
}
Seems like some (ajax?) content population requires accessing the admin in someway.
So, how to keep everyone except admins out of the admin area but still allow all this content stuff to be uninterrupted?