Support » Plugin: WPS Hide Login » This has been disabled

  • Resolved wass1

    (@wass1)


    Hello, great plugin.
    I am just wondering if it is possible to remove the “This has been disabled” page? Can i make it just a normal 404 Not found page like any other page that does not exist?

    Thanks

    • This topic was modified 5 years, 9 months ago by wass1.
Viewing 7 replies - 1 through 7 (of 7 total)
  • +1, I need this too, iThemes Security Backened was broken my password reset with WooCommerce and Supersocializer, this plugin is working perfectly but this message is awful.

    Well, a quick look at wps-hide-login.php shows that the string is hard coded. You should be able to replace it with your own string.

    -Frank

    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);
    }

    Hi @fstab I tried your code, however… It didn’t produce the result that I was expecting. I was expecting the code to redirect to a 404 not found page. However, it doesn’t do that. The page simply displays a white blank page. It does not redirect. Can you please tell me what I need to do to make this work so that it does not display a blank white page?

    Thank You

    • This reply was modified 5 years, 9 months ago by Nick.

    Check your theme files if is there 404.php file. This code is redirecting the query right to this 404.php
    a) i got 404.php in theme files (check the source code, what is presented inside)
    b) there is no 404.php (create one, follow the codex https://codex.wordpress.org/Creating_an_Error_404_Page#Editing_an_Error_404_Page)

    Let me know how is it goin

    Cheers

    I do have a 404 page in there. We’re running the Divi theme. Here is the code that is located within the 404.php page.

    <?php get_header(); ?>
     
    <div id="main-content">
        <div class="container">
            <div id="content-area" class="clearfix">
                <div id="main-area">
                    <article id="post-0" <?php post_class( 'et_pb_post not_found' ); ?>>
                        <?php get_template_part( 'includes/no-results', '404' ); ?>
                    </article> <!-- .et_pb_post -->
                </div> <!-- #left-area -->
            </div> <!-- #content-area -->
        </div> <!-- .container -->
    </div> <!-- #main-content -->
     
    <?php get_footer(); ?>
    • This reply was modified 5 years, 8 months ago by Nick.
    • This reply was modified 5 years, 8 months ago by Nick.

    You have to disable this plugin and set login urls to default, it must work then 🙂 Or try to debug what is wrong over there

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘This has been disabled’ is closed to new replies.