How to hide “You are now logged out” message on WordPress login form?


I want to hide the login message that shows up on the WordPress login form after a user has logged out. Added screenshot of the message that I am trying to hide.

WordPress Version 5.4.2

Wordpres theme: Oceanwp 1.8.9

I have used the below mentioned code in the functions.php file of my theme.

add_filter( 'wp_login_errors', 'my_logout_message' );

function my_logout_message( $errors ){

    if ( isset( $errors->errors['loggedout'] ) ){
        return null;

    return $errors;

Error Recieved:

I have provided the screen shot of the error that I have recieved.

Also, the login form isn’t visible after user logout.

depar 4 months 0 Answers 24 views 0

Leave an answer