Disable Login Screen Language Switcher
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading
add_action( ‘login_footer’, function () { remove_action( ‘login_footer’, ‘wp_shake_js’, 12 ); } );Continue reading
/** * Allow login with email only.. By Amiru アミル さん */ // 1. Authenticate user by email if username is not provided. add_filter(‘authenticate’, ‘authenticate_with_email’, 20, 3); function authenticate_with_email($user, $username, $password) { if (empty($username) && !empty($password)) { // Check if…Continue reading
document.addEventListener(‘DOMContentLoaded’, function() { // Select the input element by its id var usernameInput = document.getElementById(‘user_login’); // Check if the element exists to avoid any potential JavaScript errors if (usernameInput) { // Change the placeholder text usernameInput.placeholder = ‘Username or Email’;…Continue reading
// Redirect all users to a specific page after login from a specific login page function custom_mepr_login_redirect_url($url, $user) { // Check the referrer to see if the login request came from a specific page if (isset($_SERVER[‘HTTP_REFERER’])) { $referrer = $_SERVER[‘HTTP_REFERER’];…Continue reading
// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading
// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading
remove_filter( ‘authenticate’, ‘wp_authenticate_email_password’, 20 );Continue reading
add_filter( ‘login_errors’, function ( $error ) { // Edit the line below to customize the message. return ‘Something is wrong!’; } );Continue reading
function kill_math_on_login() { remove_all_actions( ‘mepr-forgot-password-form’ ); remove_all_actions( ‘mepr-login-form-before-submit’ ); remove_all_filters( ‘mepr-validate-forgot-password’ ); remove_all_filters( ‘mepr-validate-login’ ); } add_action( ‘plugins_loaded’, ‘kill_math_on_login’ );Continue reading