[Resolved] Removing "log out" option in comments

Home Forums Support [Resolved] Removing "log out" option in comments

Home Forums Support Removing "log out" option in comments

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #191222
    Jaakko Pöntinen

    Heya.

    How to remove the logout link in the comment form?

    – Jaakko Pöntinen

    #191233
    Tom
    Lead Developer
    Lead Developer

    You could try this:

    .comment-respond .logged-in-as {
        display: none;
    }
    #191333
    Jaakko Pöntinen

    Hey,

    That sure works but also removes the “logged in as [username]”. Could you, in a future version, add classes or other identifiers to the two a tags s so that you could fiddle with them easier 🙂

    Thanks! I’ll go with your fix for now!

    – Jaakko Pöntinen

    • This reply was modified 7 years, 10 months ago by Jaakko Pöntinen. Reason: formatting problem
    #191371
    Tom
    Lead Developer
    Lead Developer

    I just added a class of comment-logout to the log out link in the next version 🙂

    #191720
    Jaakko Pöntinen

    Hey,

    yay, thank you! 🙂

    – JP

    #440214
    Tom
    Lead Developer
    Lead Developer

    This class will be removed in GP 2.0, as we want to use the core text.

    Instead of hiding it with CSS, do this:

    add_filter( 'comment_form_defaults', 'tu_remove_logged_in_as' );
    function tu_remove_logged_in_as( $defaults ) {
        $defaults['logged_in_as'] = '';
    
        return $defaults;
    }
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.