How to disable, remove, delete or edit comments in WordPress. How to disable comments in WordPress How to disable comments in WordPress

Hello to all readers of the blog site. In this article we will talk about why many webmasters want to remove comments from their sites, prohibiting the visitor from expressing an opinion.

Due to the fact that my blog runs on the WordPress engine, in this post I will explain step by step how to remove comments from Wordpress sites through the site’s administrative panel.

Before we get into the practical part of this lesson, let me share some scientific information about the role of comments in the lives of netizens.

But how to do that? For such purposes, comment forms were invented on websites, where anyone can scribble a couple of lines of their insatiable mind.

The role of comments on the site

Comments- this is a specially designated place under the article where the visitor can write any text about the material he read, as well as write suggestions or wishes.

This feature is present on almost all blogs that support the scripting language. On my website you can see it below after this article.

The WordPress engine is written in this language, so commenting is present there autonomously, unless you remove it yourself.

A simple example of how this works on all platforms. Let's say you read an interesting article (read in detail about how to do this) about all the methods of fishing in winter, but since you are a first-class fisherman and know a couple of new methods not described in the article, so you would like to tell the author about them, and he will reflect them in a post that other users will read.

But how to do that? Of course, you can search the website for the author’s contact information and write him an email. It will take time for him to respond and then post them in the material. Well, what if he doesn’t read it at all?

This is where the comment form comes to the rescue. You leave a comment and it is immediately visible to users and the author.

But not everything is as good as described above. Nowadays a very large number of evil and cunning optimizers have appeared on the Internet who promote their projects through spam comments on other sites, and the whole point is that Wordpress blogs are the most susceptible to this attack.

Personally, I don’t really like it when the admin panel receives hundreds of comments a day with all sorts of advertising or unnecessary information, which, in addition, does not correspond to the topic of my articles.

Well, what if the webmaster decided to create a business card website, a one-page website or an advertising website. What should they all do? In order to turn your resource into a statistical one, you will need to remove comments from posts. But how to do this will be discussed further.

How to remove comments in wordpress

The WordPress engine has an automatically built-in function that allows you to leave comments on pages and articles.

Some people prefer to set up WordPress in such a way that visitors can leave comments only on articles, but I chose the option to remove all comments in this engine.

Let's consider two examples of how this can be done:

1) Go to the console of your WordPress site and click the “Options” - “Discussion” tab and uncheck the “Allow comments on new articles” checkbox.

But this way you will ensure that people will not be able to leave comments on new posts, but old ones will still have them, so let’s look at the second method.

2) Here we need to remove several commands in the files index.php, single.php And archive.php. To do this, go to the "Appearance" - "Editor" tab. And we remove the following lines from these files, which I underlined below:

In file index.php remove the line

In file archive.php remove the line

3

We can talk for a long time about whether to leave comments on a blog or not. My personal opinion on this matter is that without comments, a blog turns out to be somewhat lifeless and boring.

This is where I end the article, all that remains is to listen to your opinion on this topic. Bye!

Good afternoon friends!

If you have a problem with how to disable WordPress comments on your site, then you have come to the right place.

After reading this manual, you will be able to prohibit your visitors from leaving comments on all posts, as well as on each one individually. In addition, you can remove the comment form, which is completely unnecessary if the discussion of posts is closed.

I don't know why you need to remove comments, but for that matter, the instructions are in full before you below.

In most cases, for informational sites, I don't recommend doing this, since comments are one of those ranking factors where search engines understand that if there is a discussion on the page, then the content is worthy of attention.

If you have some kind of business card site, directory or catalog, then comments on such a resource are completely unnecessary, since you will receive nothing except spam.

Disable commenting on new articles

This action is the first step in completely disabling comments, since it is first necessary to prohibit leaving comments on new materials, and then on existing ones.

Everything is done very simply through the WordPress admin panel. First, go to the “Settings - Discussion” item and prohibit leaving comments on new articles.

We remove this checkbox so that there is no checkmark. Now new articles should not have a comment form. If it is, then when you try to leave a comment, it will display the message “Sorry, discussion of this post is closed.”

If the form does not disappear, it means that the template is designed this way and in the last paragraph of the article I will explain how to remove it.

Disable comments for all existing posts

First, I will describe all the steps to you, and then number them in the screenshot to make it more clear.

  1. We go to the list of all records through the item “Records - all records”;
  2. Select all entries with a check box;
  3. Select to change all records;
  4. We prohibit comments and update the settings.

The screenshot is clickable. You can watch it in full size.

Note that the screenshot shows a mass editing block where you can disable commenting. In the original version, when you just go to the list of all records, it will not be there. It appears only after the 3rd action, when we select the change option.

Before mass editing to cover all posts, you need to display them on one page so that they all stand out and the changes are applied to all posts at once. This is done using the display settings (screen settings) in the admin panel.


The button is located at the very top of the admin panel on the right side. Set your own number of entries. If you need to disable 300 records, then set this value.

The process of disabling discussions for service pages (site map, contacts, etc.) also occurs. As a rule, you should always disable comments for them, since they do not provide any meaning to the site.

Everything is done in the same way as with articles, only we go to the “Pages - all pages” item.

If you need to return commenting back, then everything is done in the same way, only select the “Allow” item.

Let's look at how to disable comments on certain articles.

Remove comments from certain posts and pages

There is an option when you need to disable discussions only in some posts. For example, you publish news on your blog about the New Year's sale of your information courses. Why comments on such notes? In such cases, comments should be removed.

You can do this:

  • through a list of all records;
  • through the post editor.

Through the list of all entries, you need to go to the properties of the article and remove the checkbox from the “Allow comments” item.

You can also do this through the post editor, and this is more convenient, since you can close the discussion immediately during the publishing process. But to do this, make sure that the discussion item is displayed in the screen settings inside the editor.


At the bottom of the text entry field there should be a block with the same name, where you can remove the checkbox and prohibit visitors from communicating on the site.


The same goes for pages.

To consolidate, a short video on the information described above.

There is one last and perhaps most difficult step left.

Removing the comment form from the site

Unfortunately, not in all templates, when you disable discussions, the comment form disappears. I still have it. If your form has not disappeared and you don’t need it at all, then now I will try to explain in detail how to remove it from the site.

Unfortunately, you can’t do without editing the template files, since the form is displayed by PHP code, which needs to be removed from the file. The problem is that it is displayed differently in each template. For some, it is displayed in a separate file, and then simply loaded from PHP code. And for some, the form code will be contained directly in the record output file.

My template displays the form as the second option, when the form code is directly in the single post and page file. In WordPress templates that are available on the site after installing the engine, the form is derived from a separate file. In general, now I will consider these 2 options.

To start, I always recommend going to the pages (page.php) and single post (single.php) files and looking for code in them that displays the form. If there is one, then simply remove it and the problem is solved. In my template, this code is displayed in full with all fields (entering name, e-mail, website and message).

It is quite possible that you have the same template structure. Then you go to these files and look for code similar to the one in the screenshot above (clickable). The code will always be similar and there will be a large presence of the words “comment” in it.

If it exists, then find its beginning and end and delete it to hell...

If not, then it is quite possible to output a comment form from another file using a function. In the standard Twentyfourteen template, this is done this way.

The form code is in another file somewhere (eg comments.php, comments-template.php). But this code is still output to a single post and page. The Twentyfourteen template implements this as follows.


In this case, the code also has the words "Comment". You can remove it, but this is not necessary, since this code does not display the form when the discussion is disabled.

There may be a situation that in the file of a single entry (single.php) and a page (page.php) you will not find any similar code, both in the first and in the second case. Then the form is displayed along with the content. This makes things a little more complicated, as some templates may have very complex functions that render the content. In this case, I suggest going to comments.php, comments-template.php (or similar) and looking for the form there.

They may contain more than one code variant. Then you delete in parts and check for the presence of a comment form on your site. I strongly recommend that you edit the files on your computer and make backup copies so that you can return everything to its place at any time.

This process has some difficulties for a beginner. Especially if the template is confusing. In any case, I did not disable comments on my site. Therefore, if problems arise, write your questions.

That's all, friends. Bye.

Best regards, Konstantin Khmelev!

There are times when users need to disable comments in WordPress. Let's figure out how to do this.

As always, there are several ways. Choose the one you need.

Disabling comments via the control panel

1. Go to the admin panel of your site, then to “Options” and “Discussion”.

2. Here we uncheck the “Allow comments on new articles” line.

Disable comments when editing pages

1. If you don’t have options for setting up discussions on the page for adding or editing a post, then click “Screen Settings”.

3. And now, when editing pages, to prohibit commenting, uncheck the “Allow comments” option.

Disabling comments on posts

If you want to disable commenting for one post, then:

1. Place the mouse cursor over the desired entry and click “Properties”.

2. The recording properties open. Find the line “Allow comments” and uncheck the box. Click “Update”.

If you need to remove comments from several posts, then do the following:

1. First, select those posts from which you want to remove comments.

2. Now select the action with records.

Select “Change”. And click “Apply”.

3. Now in the comments we change “As is” to “Ban”. Click “Update”.

Removing comments from the entire blog

  1. To remove all comments from a blog, you need to go to your hosting control panel, phpMyAdmin.
  2. Then find your site's database (on the right).
  3. In the sign that appears, look for “wp_comments”.
  4. Opposite this inscription we find the “Browse” window.
  5. We click and in it we can turn off comments, remove them or delete a specific comment.

You can also remove comments in WordPress in the template or theme of your site.

  1. Go to “Appearance”, “Editor”.
  2. We look for the file “One entry” single.php and delete “».
  3. Find the “Page Template” file and delete the same line as in the previous file.

Here are the different ways you can disable or remove comments in WordPress.

To entries on the user and community pages, and also learn how to prohibit commenting on photos and videos on VKontakte.

Disable comments. Why is this necessary?

Why do you need to disable commenting at all? Perhaps you just don't want other users to discuss your posts or media. Or you are an administrator of a large group, and the community material is such that it does not need commenting. Or most of the discussions are devoid of any meaning, and it’s difficult for you to moderate a lot of such “empty” comments. There can be many reasons. Let's look separately at how to close discussions on publications and media files.

How to disable comments on posts on a user's wall

To prevent users from discussing yours, you need to perform some manipulations.

1. Go to the “Settings” section

When you hover your cursor over this item, a tooltip appears. It says that you can discuss such a post only when another user visits your page. In this case, comments will be displayed on the wall of the user who shared the post.

If you turn off comments and look at your wall, you will see that the comment icon () under the post is no longer there.

3. You can not categorically prohibit discussion, but limit the ability to comment and view comments for some users or groups of users. To do this, in the “Privacy” tab in the “Posts on Page” window, in the third and fourth settings items, you can select from the drop-down list who will be allowed to leave and view comments on posts on your wall.


How to disable comments in a VK group

By default, when creating a group, comments on all posts on the community wall are allowed.

To prohibit comments in a group, you need to go to the group settings (icon) and select “Community Management”

That's it, now discussions of news will be unavailable to group members.

How to block comments on photos

To disable comments on photos, you need to do the following:

1. Go to the page with , select the album in which you want to prohibit comments, and select the “Edit Album” option (when you hover over a photo album, a pencil icon appears in the upper right part).

Or select a similar editing action in the album itself.

2. Then select the item “Who can comment on my photos” and select the desired item from the drop-down list. Then we save the changes.


How to disable video discussion

You can prohibit commenting only on VKontakte videos that you uploaded yourself.

To close the discussion of yours, you need to:

1. Go to the page with the video in the “My videos” section and on the video click the “Edit” icon

Now no one except you will be able to leave a message under this video.

WordPress is the most optimal CMS option for managing content on blogs of various formats and small sites. Despite all the functionality of such a successful and popular software product, owners of Internet resources often need to remove one or another function in this system.

It's no secret that most bloggers who use WordPress often want to disable comments in it. They do this for various reasons. Most people want to remove them because they simply don’t need them. Some people want to replace them with other solutions, and there are those who just want to remove them, for no reason. Therefore, learning how to disable WordPress comments will be of interest to all users of this platform.

There are several ways to disable commenting in this CMS.

Before you start blocking them, you should carefully monitor whether this will harm the site’s activities. If we are talking about any blog, then it is not advisable to disable them.

But, for those who still decide to disable them, this article offers several ways:

  1. blog-wide shutdown;
  2. disabling on a specific page or post;
  3. disabling for all pages and blog posts;
  4. complete disabling with deleting the comment form.
  5. Disable comments on the entire blog.

The program initially has the commenting function enabled for all pages. In order to disable this function, you need to go to the admin panel and open the “Settings” tab. Next, select “Discussion”. To completely disable entries from other users in the program, you should uncheck the “Allow comments on new articles” option. Then we save the new settings. Now, where the comment form was displayed, a message will appear stating that “comments for this page or post are closed” or there will simply be nothing there. After which, access to blog posts will be completely disabled.

Disable commenting on a specific page or post

If you want to disable commenting on a post or a specific page on your blog, you must first go to the list of all pages of this blog. To do this, go to the admin panel, then click on the “Pages” item, and then go to the “All pages” column. Select the page from which you want to remove comments, hover your mouse over the title of this page and open the “Quick Edit” link in the “menu” that pops up. In the panel that appears, uncheck the “allow discussion” box and click the “Update” button. After following these instructions correctly, commenting on the page you selected will be disabled. You can do the same with WordPress posts.

Disable comments for all pages and blog posts

You can disable comments for all pages and blog posts using PHPMyAdmin. Connect to your hosting and go to phpmyadmin, find the “wp_posts” table, click the table name and go to this table using the SQL tab in PhpMyAdmin. Then you need to click the “Run” or “Go” button, which is located at the bottom right. This way you can remove comments from all WordPress pages without affecting posts that can be commented on. To remove comments for posts in this program without changing blog pages, you need to do the following - run an SQL query on the database:

UPDATE wp_posts SET comment_status=’close’ WHERE post_type=’post’

Disable commenting permanently by deleting the form itself

If you want to not only prohibit comments in WordPress for all articles, but also permanently delete the form itself, you need to do the following:

  • go to the administrative panel;
  • Click “Appearance - Editor”;
  • in the right corner click “single.php”;
  • find and delete the code:

Once you remove this feature, no one will leave you feedback. Next, you need to remove this line, save the file and do the same with the page.php file.

Did you like the article? Share with friends: