I can't recall how many times I have been asked by numerous people how to remove the "Comments are Closed" text from the bottom of WordPress posts. So, I have decided to write a quick tutorial on the subject. The following tutorial explains how to remove the Comment option and Comments are Closed text from being made available on your posts. One common request is how to remove specific comments from text that might clutter the appearance of your site. By following the steps laid out in this tutorial, you'll not only streamline your post's design but also enhance the user experience. This will allow your content to shine without unnecessary distractions.
The Process:
- First log into your WordPress admin panel and select Settings -> Discussion from the menu
- Uncheck the box that says: Allow people to post comments on the article then click the Save Changes button
- Select Design -> Theme Editor from the menu and open Single Post (single.php)
- Find the following code: <?php comments_template(); ?> and remove it.
- Find the following and remove it:
- Then click the update file button
- Select Manage -> Posts from the menu. Open the post you would like to remove comments from.
- Under the Comments and Pings Option, uncheck the Allow Comments box and then click the save button.
- Repeat steps 7 and 8 as necessary for all pages
<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Neither Comments, nor Pings are open ?>
Both comments and pings are currently closed.
That's it, now "Comments are Closed" text will not appear at the end of the post.