How can you remove the reply button under each comment in Drupal 8? I understand there is an option "Show reply form on the same page as comments", but I am not trying to remove this form. Only the reply button.

How can the reply button be removed?

3 Answers 3


You could use the hook_comment_links_alter()

use Drupal\comment\CommentInterface;

 * Implements hook_comment_links_alter().
 * Unsets the "Reply" link of a comment.
 * @param array &$links
 *   A renderable array representing the comment links.
 * @param \Drupal\comment\CommentInterface $entity
 *   The comment being rendered.
 * @param array &$context
 *   Various aspects of the context in which the comment links are going to be
 *   displayed, with the following keys:
 *   - 'view_mode': the view mode in which the comment is being viewed
 *   - 'langcode': the language in which the comment is being viewed
 *   - 'commented_entity': the entity to which the comment is attached
function mymodule_comment_links_alter(array &$links, CommentInterface $entity, array &$context) {
  // Unset the "Reply" link
  if(isset($links['comment']['#links']['comment-reply'])) {

Go to Structure >> Comment types and under Manage display, move "Links" to Disabled section.

Save and the Reply link for each comment will disappear.

enter image description here

  • But this will remove ALL action links, not just Reply.
    – Marassa
    Commented Jan 29, 2021 at 5:39

The forms in Drupal 8 are entities, through the administration of the form you can manipulate the fields and in the presentation of the type of content you can show it, the button can be deleted from the entity of the comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.