Disable or Disallow Comments in WordPress

You can disable comments in wordpress easily. The trick is to go to Settings -> Discussion -> then uncheck option “Allow people to post comments on new articles”

This setting applies to all new posts that will be published from now onwards. To disable comments from posts that have been published.

Posts -> select all then click “Edit” under bulk actions and click apply >> choose “do not allow” next to comments and hit update posts.

If you don’t want the comment form to show on any post or pages then locate all occurrences of the code below and remove it.


<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

I you don’t want the text “Comments off” to be displayed then look for wp-icludes/comment-template.php and open it in a notepad. Change the line


function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = 'Comments Off' )

to


//change $none = 'Comments Off' to $none = ''
function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = '' )

Readers of this post, also read:

  1. How to Enable Threaded Comments in WordPress
  2. Author Page – All Comments by an Author
  3. 5 Great Code Snippets For WordPress

About Emerald

Emerald is a Computer Science student and part time blogger from Lahore, Pakistan.
She is a .NET application developer, PHP programmer and wordpress expert.

More Posts

Follow Me:
TwitterFacebook

Did you like this? Share it:

Leave a Reply