Hide the "Remember Me" Checkbox
Removes the Remember Me option so every login ends when the browser closes, which suits shared or public computers.
Opens WPIDE on
Code
add_action( 'login_enqueue_scripts', function () {
wp_add_inline_style( 'login', '.login .forgetmenot{display:none;}' );
} );
// Ignore the field even if it is submitted.
add_action( 'login_init', function () {
unset( $_POST['rememberme'] );
} );
Notes
Do not combine with snippets that tick Remember Me by default.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.