≡ Menu

WordPress: How to Remove Comments Entirely from Pages

In a previous post, I told you how to remove the comment box from a specific wordpress page or post. Sometimes that’s not enough because you still get the “Comments on this entry are closed” message, which is kind of like walking around with your shoes untied, amiright?

wordpress, pages, remove comment box

So how do you get rid of that message? Two ways that I know of.

Pick one:

1. Maybe Your Theme Disables Page Comments For You

The Sticky Readers blog (the one you’re reading right now) uses the Thesis theme and it provides an option with one click. Check your themes options to see if it does this as easily for you. For Thesis themes, go to your WordPress Dashboard and under Thesis, click Design Options. Look for the Display Options section and click on Comments. You can easily switch between having your shoes untied or walking around like a pro by disabling comments on all pages and not showing a message:

wordpress, thesis, comments off, pages

To remove the messages, check the box that says “Disable comments on all pages”. Uncheck the “display a message” option. Don’t forget to click the SAVE button. Check a page or two…

wordpress, comments disabled, no comment message

no more "comments are closed" messages! woo hoo!

…and then there’s the other option…

2. Modify Your Page.php File

 

Take a deep breath, we’re going into the code.

On your WordPress dashboard, on the left-hand side click on Appearance, then Editor.

wordpress, edit template

On the right-hand side of your dashboard, a list of Templates will appear. Select the one labeled Page Template (page.php).

wordpress, edit template, page.php

Your Page.php code will appear in the center window.  Scroll down a few lines until you see:

<?php comments_template(); ?>

wordpress, edit themes, page.php

OK, are you still holding your breath? Delete that line. No, wait!

If you want to be paranoid, comment out the line, rather than delete it. This means ADDING a few characters to the line to render it useless, but you still have it in there in case you change your mind later.

To comment out the line, insert 2 forward slashes: //    just before the comments_template() string.

Like this:

<?php //comments_template(); ?>

Here’s what it looks like in the page.php file:

wordpress, edit pagephp, remove comments

Insert 2 forward slashes: // just before the comment_template()

This way, you can revert back if something goes horribly wrong.

Whether you delete the line or comment out the line, be sure and SAVE your changes.

Now, exhale.

Please note, this method disable comments for WordPress PAGES only, not blog posts.

Again, if you just want to “turn off” comments, which removes the comment form, and don’t mind the “comments are closed” message that appears, those instructions are here.

{ 4 comments… add one }

  • Sherri April 11, 2012, 10:30 am

    YOU are an angel. I have been searching for this option ALL. DAY. Now my bra strap will never show EVER AGAIN!

    Thank you!!!

    • Margaret April 11, 2012, 2:34 pm

      Hi Sherri! I’m so glad you have fixed your bra strap issue!

  • Dave December 7, 2012, 2:52 pm

    Thank you so much! I have been getting hit hard with a ton of spam on my portfolio site and was tryign to figure this out! Your a life (and time) saver!

  • http://ascia2011.com/ October 2, 2013, 5:37 am

    whoah this weblog is fantastic i really like studying
    your posts. Keep up the good work! You already know, lots of individuals are hunting round for this information,
    you could help them greatly.

Leave a Comment