How To Remove a "Reply" Link In Drupal 7 Comments

30 Aug · by Tim Kamanin · 1 min read

In your _template.php_ file add the following code:

function themename_preprocess_comment(&$variables) {

Don't forget to change _themename_ to your theme 's name. Now, everything should be working.


Required for comment verification


However this don't avoid user with drupal knowledge to post replies by typing the direct URL, we prolly fix this by altering hook_menu_alter

Reply · 5 years, 3 months ago

Thanks, Tim! That's what I was looking for!

Reply · 5 years, 3 months ago
Mike Skull

Ive used this in the past to help manage it using the admin area on a content type basis: (so as to avoid a push to live to change it for a new content type added for instance) Thought it might help

Reply · 5 years, 3 months ago

Yes, that's pretty much the only solution to this issue... Maybe a more flexible solution would be to use a separate permission for this.

Reply · 5 years, 3 months ago

That'll work but the more elegant approach would be to use hide() instead of unset() so that it's still in the render array and just flagged so its not shown.!

Reply · 5 years, 3 months ago