• First off I’d like to thank you very much for this great plugin! It stops 90% of the nonsense that hits the admin login.

    I wonder, is there a way to add a redirect if the code that is entered is not correct? I’d like to redirect bad users to this happy page. https://www.sanger.dk/

Viewing 1 replies (of 1 total)
  • Plugin Author Mitch

    (@lowest)

    That is possible, but I don’t think it’ll become a feature in this plugin.

    If you still want to archieve this:

    Open the authentication-code.php file, and find this piece of coding (line no. 130):

    		if( ! $is_valid_auth_code ) {
    			$user = new WP_Error(
    				'invalid_auth_code',
    				sprintf(
    					'<strong>%s</strong>: %s',
    					esc_html__( 'ERROR', 'authcode' ),
    					esc_html__( 'Authentication code is invalid.', 'authcode' )
    				)
    			);
    		}

    Replace that piece of coding with this:

    		if( ! $is_valid_auth_code ) {
    			$url = 'https://www.sanger.dk/';
    			$user = wp_redirect($url);
    		}

    Save the file. Once the visitor enters the wrong auth code, he will be redirected to your happy page.

    For any questions, feel free to let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding A Redirect?’ is closed to new replies.