# Hide the "Remember Me" Checkbox

> Removes the Remember Me option so every login ends when the browser closes, which suits shared or public computers.

- Type: PHP
- Runs: Run everywhere
- Category: [Login](https://wpide.com/library/category/login/)
- Tags: login, sessions, security
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/hide-remember-me-checkbox/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide the "Remember Me" Checkbox" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
