Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Help to remove "Must be logged in to reply" link in comments

  1. #1
    Karl1's Avatar
    Karl1 is offline Hello World
    Join Date
    Jul 2011
    Location
    Seville, Spain
    Posts
    35

    Default Help to remove "Must be logged in to reply" link in comments

    Hi, anyone knows how can I remove the link on the comments, the one that says that you must be logged in to reply.
    I need to leave the text without the link

    thanks

  2. #2
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,997

    Default

    No clue. That text is Theme-specific.
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  3. #3
    MiroslavGlavic is offline Here For The Peanuts
    Join Date
    May 2009
    Location
    Toronto, Canada
    Posts
    177

    Default

    @chip : I think you are wrong.

    @Karl1 : Click on [Settings] then go on [Discussion] then [Other comment settings] and uncheck [Users must be registered and logged in to comment].

  4. #4
    Karl1's Avatar
    Karl1 is offline Hello World
    Join Date
    Jul 2011
    Location
    Seville, Spain
    Posts
    35

    Default

    Hi Miroslav, I guess I didn't explain myself. I don't want to let everyone to comment. Only the registered users.
    Usually in a comments thread if you are not logged in, you have the message that says that you must be logged in to comment and in every existent comment there's also a reply to this comment.
    As for the very last at the bottom, I could remove the link by modifying the comments.php , but the reply to this comment I cannot find it
    Please check screenshot

    -What you explain in your message will let anyone to comment on

  5. #5
    kovshenin's Avatar
    kovshenin is offline Hello World
    Join Date
    Sep 2011
    Location
    Moscow
    Posts
    14

    Default

    Maybe your comment form is rendered by the comment_form() template tag, so you looking at comment-template.php you can try something like this:

    PHP Code:
    function my_comment_form_defaults$defaults ) {
        
    $defaults['must_log_in'] = ''// or whatever you want it to say
        
    return $defaults;
    }
    add_filter'comment_form_defaults''my_comment_form_defaults' ); 

  6. #6
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,997

    Default

    Quote Originally Posted by MiroslavGlavic View Post
    @chip : I think you are wrong.
    No. He's asking how to remove the text, not the functionality.

    Unfortunately, without knowing what Theme he's using, there is absolutely no way to give the OP specific instructions for modifying/removing that content.

    That said: Konstantin is probably correct. If I had to guess, I'd say the OP is using Twenty Eleven - in which case, the "must be logged in" text is coming from the `comment_form()` function, and can be removed using the filter, as he suggests.
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  7. #7
    Karl1's Avatar
    Karl1 is offline Hello World
    Join Date
    Jul 2011
    Location
    Seville, Spain
    Posts
    35

    Default

    hey,
    I'm using Phenomenon theme from Bluzz, and I need just to remove the link as this is a closed site (only clients can comment), I mean, the blog side the public can see (but not reply or comment), and if they click in the reply link it will forward them to the WP default login page (I need to avoid that), if you see the theme you will see a login button in the top right already.
    **So, basically I want to leave the text without the link

  8. #8
    Karl1's Avatar
    Karl1 is offline Hello World
    Join Date
    Jul 2011
    Location
    Seville, Spain
    Posts
    35

    Default

    Quote Originally Posted by kovshenin View Post
    Maybe your comment form is rendered by the comment_form() template tag, so you looking at comment-template.php you can try something like this:

    PHP Code:
    function my_comment_form_defaults$defaults ) {
        
    $defaults['must_log_in'] = ''// or whatever you want it to say
        
    return $defaults;
    }
    add_filter'comment_form_defaults''my_comment_form_defaults' ); 
    I don't have that, rather I've the following in my functions.php :
    PHP Code:
    function mytheme_comment($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment; ?>


    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
      <div id="comment-<?php comment_ID(); ?>">
        <div class="comment-left">
          <div class="comment-author vcard"> <?php echo get_avatar($comment,$size='60'); ?> <?php printf(__('<strong>%s</strong>'), get_comment_author_link()) ?> </div>
        </div>
        <div class="comment-right">
          <?php if ($comment->comment_approved == '0') : ?>
          <em>
          <?php _e('Su coment&aacute;rio tiene de ser aprovado.'?>
          </em> <br />
          <?php endif; ?>
          <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialcharsget_comment_link$comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a>
            <?php edit_comment_link(__('(Edit)'),'  ',''?>
          </div>
          <?php comment_text() ?>
          <div class="reply">
            <?php comment_reply_link(array_merge$args, array('depth' => $depth'max_depth' => $args['max_depth']))) ?>
          </div>
        </div>
      </div>
      <?php
            
    }


    ?>
    any idea?
    Discovering Wordpress

  9. #9
    kovshenin's Avatar
    kovshenin is offline Hello World
    Join Date
    Sep 2011
    Location
    Moscow
    Posts
    14

    Default

    Karl, that renders the comments themselves, but not the comment form. Take a closer look at the templates in your theme :)

  10. #10
    Karl1's Avatar
    Karl1 is offline Hello World
    Join Date
    Jul 2011
    Location
    Seville, Spain
    Posts
    35

    Default

    the comment form is in the comments.php, right?
    http://snipplr.com/view/59038/commentsphp/

    please have a look
    Discovering Wordpress

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •