Disable comments globally in WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /* Add this code on your functions.php (or other) file */
  2.  
  3. function __disable_feature($data) { return false; }
  4.  
  5. add_filter('comments_number', '__disable_feature');
  6.  
  7. add_filter('comments_open', '__disable_feature');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.