Created
August 26, 2016 03:35
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* Mind this opening PHP tag | |
// Remove the logout link in comment form | |
add_filter( 'comment_form_logged_in', '__return_empty_string' ); |
It's overriding a template file. I'd recommend getting in touch with a developer if unsure about this. Errors could cause your page to crash.
indeed. I'm not a programmer.
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;
}
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
Hi . Is this about deleting an entire file? Need to delete the entire file?