Support » Fixing WordPress » Remove or hide reply to comment link

  • Resolved angeljs

    (@angeljs)


    [ Moved to the Fixing WordPress sub-forum. ]

    I was wondering if it’s possible to hide or remove the reply link at the bottom of each comment?

    I still want to show the comments box beneath the comments, just remove the link to reply to individual comments.

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Please review the Forum Guidelines and provide enough information for your question to be answered.

    Forum Guidelines

    if you want desable comments from all pages use this plugin.
    https://wordpress.org/plugins/disable-comments/

    or

    to go to Settings -> Discussion in the WordPress admin and uncheck the “Allow people to post comments on new articles” option. Doing so will disable comments for all future posts.
    for help : https://en.support.wordpress.com/settings/discussion-settings/

    thanks

    You can also get help from this video.

    • This reply was modified 2 years, 5 months ago by Santosh Pasi.

    Actually, that first post helped – I didn’t realise I could do this by modifying the theme files, I thought I’d have to modify WP files. 🙂 I’ve managed now, thank you.

    • This reply was modified 2 years, 5 months ago by angeljs.

    Welcome,

    if you need to remove the “reply” to comment link at the bottom of each comment.

    The given code will help you.

    1) Please find the file in you website folder

    Path is : “/yoursite/wp-includes/class-walker-comment.php”

    2) find the below code in the file class-walker-comment.php

    <?php
    comment_reply_link( array_merge( $args, array(
    ‘add_below’ => ‘div-comment’,
    ‘depth’ => $depth,
    ‘max_depth’ => $args[‘max_depth’],
    ‘before’ => ‘<div class=”reply”>’,
    ‘after’ => ‘</div>’
    ) ) );
    ?>

    3) and replace with the code

    <?php
    comment_reply_link( array_merge( $args, array(
    ‘add_below’ => ‘div-comment’,
    ‘depth’ => $depth,
    ‘max_depth’ => $args[‘max_depth’],
    ‘before’ => ‘<div class=”reply” style=”display:none;”>’,
    ‘after’ => ‘</div>’
    ) ) );
    ?>

    Thank you 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove or hide reply to comment link’ is closed to new replies.