Skip to content

Instantly share code, notes, and snippets.

@renventura
Created August 26, 2016 03:35
Show Gist options
  • Save renventura/d7e2892e95d4421188252f737093ff20 to your computer and use it in GitHub Desktop.
Save renventura/d7e2892e95d4421188252f737093ff20 to your computer and use it in GitHub Desktop.
Remove the "Logged in as {username}. Log Out?" link from the WordPress comment form.
@ThibautSembeni
Copy link

Hello,

You need to put this in your functions.php
This method catch the login field and remove it from the form !

add_filter( 'comment_form_logged_in', 'unset_login_field' );
function unset_login_field($fields){
    unset($fields);
    return $fields;
}

@Mehdi4445
Copy link

Hello,

You need to put this in your functions.php This method catch the login field and remove it from the form !

add_filter( 'comment_form_logged_in', 'unset_login_field' );
function unset_login_field($fields){
    unset($fields);
    return $fields;
}

this solved my problem thank you :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment