How to remove page comment boxes from WordPress.org themes

Fairy Blog Mother: blogging help

Fairy Blog Mother

This is a technical post specifically for WordPress.org bloggers. Recently I wrote a post showing how to remove a page’s comment box in a WordPress.com blog, as this kind of blog does not provide the option to go into the code to change it, and my research revealed the process in the ‘Quick Edit’ menu.

refers to WP.org

But going through my analytics I noted I had a lot of hits for the keyphrase relating to removing comment boxes from pages, but they all seemed to bounce without being read. Why was this? Then I realised it was because I wasn’t explaining how to do this in a WordPress.org blog. So here’s how:

Go to page.php and check it refers to comments.

Look for this code: <?php comments_template( “, true ); ?>

You can either delete this, or block its action by inserting // immediately after ?php:

<?php// comments_template( ” , true ); ?>

If you want to reactive it again, merely remove the //

Remember to activate comments in the Settings > Discussion menu.

There you go… hope it works and you have pages that are comment box free on your blog.

The following two tabs change content below.
Alice Elliott writes the award winning Fairy Blog Mother blog for beginner and post-beginner bloggers to “explain things really simply” about blogging and WordPress. She provides simple, easy to understand, highly visual courses and tutorials using ordinary, everyday words. Visit her new Beginner Bloggers blog to find her latest learning resources.
Kelly - 1 May 2011

Hi! Alice,

You’re a complete doll! I want to add Contact form 7 to my product review blog, so the tip for removing the comment form worked perfectly. I’ll be back!

Thank you!

    Alice Elliott - 5 May 2011

    You’re very welcome Kelly – glad I could help. Don’t forget to ask any questions you like and I’ll do my best to answer them.

A grateful visitor - 29 May 2011

Finally! I’ve been trawling the web for a simple solution, discarding all types of 2008-2010 thousand-words solutions that do not work then it turns out it is just adding ‘//’ to loop-page.php


US Building Consultants Inc - 14 December 2013

Fabulous, what a blog it is! This webpage presents valuable
facts to us, keep it up.

Comments are closed