Donation Goal
Donate Now Goal amount for this year: 799 USD, Received: 100 USD (13%)
Please donate to help support this website. The funds will be used to purchase owned license of LiteSpeed Web Server Enterprise (2-CPU). It provides superior performance in terms of raw speed, scalability and anti-DDoS capabilities.

How To Turn Off Comments For All Post In WordPress

Posted By Raymond In Category: Computer

Aug
1
2007

Let’s say a blogger will be going away for a few days and won’t have internet connection to check on the comments posted by visitors. It’s better to temporarily disable the comments to prevent spammers from flooding the comment box with all sorts of useless links. Here’s how to temporarily disable the comment form on all posts.

It requires 2 steps. Modifying the theme code and install a plugin that would stop anyone from using the wordpress comment php script.


1.) Turn off the display of the comment form in your Comments file in your template. To do this, go to “Presentation” -> “Theme Editor” then edit the Comments file. Find the part in the file that looks like this (it is probably slightly different, depending on what theme you’re using):

[code]comment_status) : ?>

Leave a Reply

[/code]

Change it to this:

[code]comment_status) : ?>

Comments are temporarily disabled

Leave a Reply

[/code]

2.) Either rename your wp-comments-post.php file (in the root of your WordPress directory) to something unguessable like betyoucantguessthis.php OR install this plugin that can temporarily disable all comments but choose to still allow trackbacks and / or pingbacks.

The second step is necessary because spammers don’t need to visit your comment form to be able to post comments.

I did this research because I will be going away for a week to Taiwan and Hong Kong. So there won’t be any articles and comments would be turned off.


Related posts:
  • Nasty Spam on WordPress Comment box
  • How to integrate link exchange manager LinkMan into your WordPress blog
  • Register and get a Live.com or localized Live account
  • Hack to turn your Windows Home Edition CD into Professional Edition
  • Fix WordPress Not Acceptable Error 406
    • http://www.raymond.cc/ Raymond

      I am back and comments has been re-enabled.

    • Sakar

      ha ha ha good one.by the way where had u been?

    • Sakar

      whic places did u visit?

    • Pingback: [Repost] siBego menulis the series « Uwiuw’s Study Room

    • http://www.crusaderextreme.com/ Stronghold Crusader Extreme

      i see this is great tips, i like them :)

    • http://1ai.org/ jarlemerak

      большое спасибо!Взяла себе тоже-пригодится.

    • http://antair.org.ua AIR

      Thanks! Works for me!

    • http://www.neptoneusa.com/Green_Lipped_Mussel_Powder.html Neptone

      Thanks! I was looking for this code.

    Copyright © 2005-2012 - Raymond.CC Blog