I want to be thrilled
Subscribe >>>

How to disable page comments in WordPress?

By default, WordPress let anybody comments on any page of your blog, which can look messy and unprofessional. Using this quick fix, you can go in your editor and fix in 2 min that problem so that only blog post will have a comment form. (See steps below)

How to disable page comments in WordPress?

STEP 1

Click on “Appearance” and then “Editor“.

STEP 2

On the right panel, find the “Content.php” page and click on it. Note that your page could look slightly different.

STEP 3

Find the following line of code: (CTRL+F to find it)

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

…and replace it with this one:

<?php if (is_single()) {comments_template( ”, true ); } ?>

STEP 4

You’re done! Now, only your “single” blog post should display the comment form.

Joel Alain is on a quest to the 4 Hour Workweek Lifestyle, Accelerated Growth & Meta Learning. He rejects status quo and the so called "common sense" and creates his own vision of reality. The goal being to live the life you've imagined, no matter how crazy that is. Hop in.
Did this article help you? I love some love ;), or leave a comment, question or add anything you think I missed.

Leave a Reply

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