Hi,
you can play with the following code:
Open wp-content/plugins/wps-hide-login/wps-hide-login.php an look for this (line 390):
if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) && $pagenow !== 'admin-post.php' ) {
wp_die( __( 'This has been disabled', 'wps-hide-login' ), 403 );
}
change it with:
if ( is_admin() && ! is_user_logged_in() ) {
wp_redirect(home_url() . '/error?m=' . urlencode($message));
exit();
}
Hmm, I tried this but it doesn’t seem to work?
It seems to be written to only redirect people who are the admin? I added an ‘!’ before ‘is_admin()’ and it seems to work now.
final code:
if ( ! is_admin() && ! is_user_logged_in() ) {
wp_redirect(home_url() . '/error?m=' . urlencode($message));
exit();
}
-
This reply was modified 9 years, 5 months ago by
lacoder.