in Web & Tech

Hide the Comment-Reply link in Drupal 7

Often times flat comments are preferred over nested ones, which makes Drupal’s default “reply to comment”-links pretty useless, if not confusing. To get rid of them just add this preprocess function to your theme’s template.php:

function MYTHEME_preprocess_comment(&$vars) {
  unset($vars['content']['links']['comment']['#links']['comment-reply']);
}

Write a Comment

Comment