Hide Login Errors in WordPress

Improve safety by hiding the specific login error information.

Use Snippet
php
<?php
add_filter(
	'login_errors',
	function ( $error ) {
		// Edit the line below to customize the message.
		return 'Something is wrong!';
	}
);
WPCode Team
600+

Disable Login Screen Language Switcher

Hide the Language Switcher on the default WordPress login screen.

Use Snippet
php
<?php
add_filter( 'login_display_language_dropdown', '__return_false' );
WPCode Team
500+

Disable Login by Email

Force your users to login only using their username.

Use Snippet
php
<?php
remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
WPCode Team
200+

Replace WordPress Logo on Login Page

Use your custom logo on the default login page, don't forget to edit the snippet...

Use Snippet
php
<?php
add_filter( 'login_head', function () {
	// Update the line below with the URL to your own logo.
	// Adjust the Width & Height accordingly.
	$custom_logo = 'https://wpcode.com/wp-admin/images/wordpress-logo.svg';
	$logo_width  = 84;
	$logo_height = 84;
	printf(
		'<style>.login h1 a {background-image:url(%1$s) !important; margin:0 auto; width: %2$spx; height: %3$spx; background-size: 100%%;}</style>',
		$custom_logo,
		$logo_width,
		$logo_height
	);
}, 990 );
WPCode Team
<10