How do I remove the WordPress comments box from pages?

How to remove the WordPress comments box from pages

How to remove comments from WordPress pages

We enjoy teaching WordPress and are happy to reply to your WordPress comments and questions.

We recently received this from a client, “My friend is muddling through setting up a wp site and is asking how to take the ‘leave a reply box’ off the site??”

What she is asking is how to remove the comment/discussion box.

I’m not sure if she wants to remove it site-wide from pages and posts or just from her static pages.

In this post we’ll cover all the steps you need to take to turn off WordPress comments:

  1. How to turn off comments on pages & posts
  2. How to turn off comments for just pages
  3. How to modify your page template to permanently remove comments
  4. How to add a function to your theme that will remove comments from pages

If you want to skip these steps and go with the easiest solution you can use a free disable comments plugin.

Solution #1:
How to turn off comments sitewide (pages & posts)

Go to Settings » Discussion » untick “Allow people to post comments on new articles

This solution applies to new posts/pages that you will publish from now on. If you have already published posts/pages you’ll need to do the following BULK EDIT to disallow comments from posts and pages that have already been published.

Bulk Edit

  1. Go to All Pages » at top next to title tick the box to select all pages
  2. Click “Edit” under bulk actions
  3. Click “apply”
  4. Choose “do not allow” next to comments
  5. Click “update”

Now repeat the bulk edit for all Posts.


OR …

Solution #2:

How to turn off WordPress comments for pages only (leave on for blog posts)

Begin with a bulk edit as explained above to turn off comments for all pages that have been published to date. If you only have a couple of pages you can click Quick Edit and turn off comments in quick edit view.

Make Discussion Options visible

You may also find it very helpful to make discussion options visible on pages, this will allow you to turn off comments on the individual page before you publish it. If you don’t see the section labelled “Discussion” below the visual editor (where you type your page content), then you need to click on the ‘Screen Options’ button located in the upper right-hand corner of the page you are on.

Here’s how to display Discussion options on a page:

  1. In the top right-hand corner of your WordPress admin panel (just below the dark grey toolbar and the Howdy, message) there is a tab called Screen Options. Click to open the screen options tab.
  2. Tick the box for Discussion
  3. Click the Screen Options tab again to close it.

Now, scroll down the page to Discussion settings and untick the boxes for “Allow comments” and “Allow trackbacks and pingbacks on this page”. The problem with this solution is that you will need to remember to turn off comments on all new pages you publish.

Solution #3:

How to remove Comments from a WordPress Page Template

The best solution is to remove one line of code from the page template that calls the comments. Always create a Child Theme before you edit theme files.

If you are using the Twenty Ten theme you would open the loop-page.php file. Locate (2nd last line) and remove the line

<!--?php comments_template( '', true ); ?-->

If you are using the Twenty Twelve theme you would open the page.php file and find the same line of code.

Solution #4:

How to remove WordPress Comments through the functions file

Note: If there are already comments on pages — do one of the methods above to remove all past existing comments before using this method.

Open your child theme functions.php file and add this code to remove comment support for pages.

//remove comments from pages
add_action('init', 'remove_comment_support', 100);

function remove_comment_support() {
remove_post_type_support( 'page', 'comments' );

Related Posts

If you liked this post, you might also be interested in one of these.
Creating your content _ Website data architecture – Part 2
What in the world is a widget?

42 thoughts on “How to remove the WordPress comments box from pages”

  1. Hi Ruth, thank you for writing such an informative article about removing comments from WordPress sites. As a blogger myself, I have been struggling to keep up with spam comments and I found your article extremely helpful in understanding how to disable comments entirely.

    I appreciate the step-by-step instructions you provided, which made the process of removing comments much simpler for me. Your article is not only easy to understand but also very thorough, covering the different scenarios where comments can be a nuisance and how to deal with them effectively. I especially liked your tips on how to communicate with readers who may have questions or feedback after comments have been disabled.

    In addition, I found your explanation of the different options available for removing comments on WordPress sites very useful. It was great to learn about the various plugins that can help with disabling comments, as well as the different approaches that can be taken to hide existing comments or prevent them from being posted altogether.

    Overall, I want to say thank you for sharing your knowledge and experience with us. Your article has made a big difference for me and I am sure it will be helpful for many other bloggers and website owners out there. Keep up the great work!

  2. The first solution of Bulk editing and discussing and unlike is the most useful. However, many people use this technique to turn off the comments. Do you think turning off the comment is a good idea? Will it not impact SEO?

  3. This is the simplest solution to remove the WordPress comments box from pages. I did it – it works. Thanks for your immediate assistance:)

  4. Thank you so much! At first my dashboard was not responding but finally it did and I am relieved to see that the website no longer offers a place for comments. That is what my client needed.

  5. Hey Ruth,
    Your points are useful to save my time on WordPress. The 4th solution is precise to completely remove WordPress comments that is too good. Thank you for sharing unique info about removing comments which is so much helpful for me. I suggest you make a blog about how to enable comment box in WordPress.

  6. I’m using the Boldline theme. If I do Solution #1, it shows ‘COMMENTS OFF’ right at the top (title section) of a post.

    Why would someone do that? I mean, shouldn’t it just hide comments altogether?

  7. I’ve searched a lot of WordPress questions, including this topic covered here. This is hands down the best and clearest site answering the question, throughly. Lots leave out steps assuming the person knows more. If we did we wouldn’t be looking for answers to questions. Thank you for the step-by-step.

  8. Hi I bought a website that has Streamline Theme by Studiopress and I want to remove the

    Speak Your Mind
    Tell us what you’re thinking…

    then the Comment Box is
    Leave comment button

    I don’t know much about code, but I can follow directions 🙂

    1. the method is great, but with it, the HTML code will remain and it takes time to load HTML. So the completely remove the comments from the dashboard is great.

    1. Martin,

      Different themes will have different file structure the theme instructions reference the twenty-ten theme. The bulk edit instructions work for all themes and are still current.

  9. Thanks a Lot to save my time. I was searching google to remove default comment box from my WordPress Blog and Found this Awesome Solution. Now i can Integrate Facebook comment plugin easily.

  10. Wow, thank you!
    I don´t usually find themes where the comments are so difficult to turn off in static pages. I am using Novelite for a client and was going crazy trying to disallow them in static pages but there was no easy way.
    I´ve followed your instructions and it works!!
    Thanks, it was most helpful.

    1. Glad that this solved it for you Esther. Thanks for taking the time to comment and let us know that it helped you.

  11. Thank you so much. I use twenty sixteen theme and have been looking for sometime to turn comments on for pages. I was half right but didn’t tick allow comments at bottom! Thank you i had just about given up.

  12. Comment this line in Comment.php file
    // if ( !current_user_can( ‘edit_comment’, $comment->comment_ID ) )
    // comment_footer_die( __(‘You are not allowed to delete comments on this post.’) );

  13. writer jireh gibson

    This tutorial is showing exactly what I did using the quick edit option. A simple fix however its always great to have a source such as this one to keep things moving along.

  14. Thank you for the information regarding removal of “leave a reply” on the twenty twelve WP theme. I followed your instructions to the page.PHP file and deleted the line. It worked fine. Also thanks for the info on Child Themes. That’s a little over my head at the moment, but I can see it has great value when playing around with these free


Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top