[Resolved] Nested comments not working

Home Forums Support [Resolved] Nested comments not working

Home Forums Support Nested comments not working

  • This topic has 9 replies, 2 voices, and was last updated 6 years ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #545941
    George

    I have nested comments 4 levels deep enabled. However no “Reply” button shows up below a comment, just the option to post a new comment. How do I enable the replies and the nesting? Here is a page as an example (look at the last comment – it used to work previously, but not anymore):
    https://www.shamakern.com/relationships-in-thailand-part-10/

    #546433
    Tom
    Lead Developer
    Lead Developer

    You have this CSS added:

    .comment-metadata {
        display: none;
    }

    If you remove it, the reply link will come back.

    #546459
    George

    This CSS is meant to hide the date of the comments. Is there another way to hide the comment date and keeping the reply functionality at the same time?

    #546481
    Tom
    Lead Developer
    Lead Developer

    For sure.

    Remove that CSS, then add this CSS:

    .comment-metadata > a {
        display: none;
    }

    Then add this PHP:

    add_filter( 'comment_reply_link_args', 'tu_remove_reply_bar' );
    function tu_remove_reply_bar( $args ) {
        $args['before'] = '<span class="reply">';
    
        return $args;
    }
    #546490
    George

    Where do I add this PHP?

    #546492
    Tom
    Lead Developer
    Lead Developer
    #546502
    George

    Thank you.

    I have another site, thaihealingmassage.com, where I used this CSS to get rid of the comment date:
    /*hide date on comments*/
    .entry-meta.comment-metadata time {
    display: none;
    }

    There is no additional PHP, and it had the desired effect of hiding the comment date, and the reply button still shows up.
    I tried the same CSS on the shamakern.com site, and it does hide the comment date, but it also hides the reply button. I don’t know why the two GP sites react differently to the same CSS.

    Is it possible to add the PHP which you recommended in the GP hooks section, and if so, where?

    #546928
    Tom
    Lead Developer
    Lead Developer

    The PHP removes the slash before the word “Reply”.

    It can only be added using one of the methods here: https://docs.generatepress.com/article/adding-php/

    The Code Snippets plugin is probably the easiest way ๐Ÿ™‚

    #547259
    George

    I followed your suggestions, and now it is working correctly. Thank you.

    #547278
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.