Paste it in functions.php . . . SOLVED
add_action( 'init', 'force_404', 1 );
function force_404() {
$requested_uri = $_SERVER["REQUEST_URI"];
do_action('debugger_var_dump', $requested_uri, '$requested_uri', 0, 0);
do_action('debugger_var_dump', strpos( $requested_uri, '/wp-login.php'), 'FOUND?', 0, 0);
if ( strpos( $requested_uri, '/wp-login.php') !== false ) {
do_action('debugger_var_dump', 'REDIRECT', 'REDIRECT', 0, 0);
// The redirect codebase
status_header( 404 );
nocache_headers();
include( get_query_template( '404' ) );
die();
}
if ( strpos( $requested_uri, '/wp-login.php') !== false || strpos( $requested_uri, '/wp-register.php') !== false ) {
do_action('debugger_var_dump', 'REDIRECT', 'REDIRECT', 0, 0);
// The redirect codebase
status_header( 404 );
nocache_headers();
include( get_query_template( '404' ) );
die();
}
if ( strpos( $requested_uri, '/wp-admin') !== false && !is_super_admin() ) {
do_action('debugger_var_dump', 'REDIRECT', 'REDIRECT', 0, 0);
// The redirect codebase
status_header( 404 );
nocache_headers();
include( get_query_template( '404' ) );
die();
}
do_action('debugger_var_dump', 'END', 'END', 0, 0);
}