Support » Plugin: Disable Comments » Disable Comments not working

  • I’ve been using Disabled Comments for a year on a WP site I run, and I have everything ticked as far as turning off comments. No comment template has ever appeared, and I have never worried about having to watch for comments. Lately, I noticed I was getting quite a few page views on some pages, and I opened them up to see if anything was amiss. Sure enough, there were a ton of comments on those pages having nothing to do with the page content. I went into the loops files associated with my theme and removed any coding with the word “comments” in it, and that has cleaned things up for now. I have no doubt that these people will be back to try again. I just wanted to alert everyone that hackers are coming up with a way around this plugin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Samir Shah


    Assuming your WordPress installation is secure, there should be no way to “hack” this plugin (and if there is, I would like to know about it so it can be fixed).

    If comments are being accepted while the plugin is active (and comments disabled), then it means either that your entire site has been hacked (in which case you have a bigger problem), or another plugin is interfering/overriding this one – in which case maybe look at which other comment-related plugins are active and try disabling them one by one.

    Is your plugin confirmed to work on WP 3.5 ?
    Please advise. Many thanks ^^

    Plugin Author Samir Shah



    Hi Samir,

    I’m curious. Wouldn’t the settings to deactivate comments in wp-admin >> Settings >> Discussions be the same as what your plugin does? I’m not sure which is better.

    Please advise. Thank you in advance.

    Plugin Author Samir Shah


    No – those settings only specify defaults which can be overridden on a per-post basis. That means that you or other users (authors, editors, contributors etc) can allow comments on individual posts even if the default is for them to be closed.

    This plugin disables comments globally in a way that cannot be overridden by any users. You should use it only if you don’t want comments anywhere on your site.

    Thank you very much.

    Hi, sorry it’s taken me so long to test this.

    First, let me say that I’ve noticed nothing unusual on my site as far as someone hacking it with the exception of the comments problem.

    I just did the following to test this plugin on my site and to try to get to the bottom of the problem I had with it.

    I opened the Disable Comments plugin’s settings page and checked that all the options were still ticked. Yes. I took a screen shot of that page.

    I checked that the Disable Comments plugin was active. Yes.

    I opened the single loop page in my child theme of the Twenty Ten theme and restored the comments code line, which I deleted when I originally noticed that the Disable Comments plugin appeared not to be working since I had comments everywhere.

    With that line restored, I checked one of the posts that I knew had been bombarded with more than 500 comments. All the comments were back.

    I put my site into maintenance mode with WP Maintenance Mode, which is a new plugin that I just added to this site in the last couple of weeks. It was not on there when the comments stuff was originally hacked.

    I deactivated every other plugin on my site. With each deactivation, I checked if the comments on that post were still there. Yes, they were. With all plugins turned off, the comments were all there.

    I took a screen shot of the comments.

    I have reversed everything now because I don’t want that stuff on my site.

    And I will send you the screenshots if you want them.

    I don’t know what to tell you. I certainly understand you defending your plugin, and I’m sure you know it backward and forward. All I can tell you is there are comments showing up on my site unless I delete the comments line in the loop-single file manually.

    I’d like to get rid of the hacked comments, but I don’t know where they are sitting in my database.

    I’ll keep them for a little while anyway in case you want me to test something else.

    Thanks for addressing the problem. Sorry I don’t have better news or better insight into what went wrong.

    Plugin Author Samir Shah


    jtm12, do you see a comment form (i.e., the option to post new comments) on the page where there are lots of spam comments?

    The plugin will not prevent your theme from displaying comments that were created before the plugin was installed (there isn’t a way to stop Twenty Ten from displaying them without editing the code, as you have done already). It will however prevent any new comments from being added. So if those comments where there before, then you just need to delete them, and after that it will ensure that no comments are added again.

    If you need help getting rid of the comments from your database, drop me an email.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disable Comments not working’ is closed to new replies.