Thread Starter
bovax
(@bovax)
Ok, thanks for your help. I dont think I have time to go to that length! I’ll see if I can find a work around or something else.
Thread Starter
bovax
(@bovax)
No! As a matter of fact nothing has changed other than adding a new post and a new function. No updates, no other new plugins. I removed this and still it didn’t work. The script was to kick anyone other than the admin from the admin dashboard which I found could still be accessed by a subscriber (the menu was showing a few of my plugins which I thought was weird). Script was (that I have now reinstated after removing it did not fix the issue):
add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && ! current_user_can( ‘administrator’ ) &&
! ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}