WordPress Me Comment Ki Minimum Aur Maximum Length Set Kare

WordPress Me Comment Ki Minimum Aur Maximum Length Set Kare

Many people feel hesitant that after creating a blog on wordpress, only post is to be written, but when they create their blog on wordpress, then it is known that how difficult it is to manage a wordpress blog. When you write a good post in your blog, the readers put a comment in it and you also have to reply to it. It is very important to have a commenting system in all the blogs, but when there are more spam comments in our blog then it is very troublesome. If your blog gets more spam comments then in this post we are telling you a solid way to deal with spam comment.
Wordpress comment me Minimum Maximum Length Limit ko kaise set kare
In the present times, I always see one thing that visitors focus more on the design than on the content of our blog. All bloggers are trying to design their site better. If the design of our blog is better, then the readers also enjoy reading and they understand it quickly.
When someone comments in our blog, we like it and almost all new bloggers like it. But if there are too many unnecessary comments in our blog, then we have a lot of trouble. If we delete those comments then it also takes a lot of our time and we cannot even reply to those comments, because there is no valuable point in it. After all, we have to delete those comments and it takes us a lot of time.
You already know what is the importance of time for a professional blogger. If you are a new blogger, then if someone comments in your blog, then you will like it, but after some time when you get more spam comments, then you will feel boring to reply to comments.
We are going to talk about how to set the limit of maximum and minimum comments in wordpress. If you know that the length of the spam comment is more, then you can avoid unnecessary comments by setting the limit of comment length in your blog.
Let us now know how to set the limit of comments in wordpress. Before this, I want to tell you one thing that the process we will tell you below, you will have to do it manually in your wordpress theme. If you do not have the right knowledge of coding, then you can also keep minimum and maximum comments limits through the plugin. For this, you install the Control Comment Length plugin. –
Step 1: – Login to your WordPress blog and Dashboard »Appearance» Editor By going to Functions.php Open it and add the following code to it.
add_filter ('preprocess_comment', 'bgh_comment_size');
/ * Change comment length max and min characters. * /
function bgh_comment_size ($ comment) {
if (strlen ($ comment[‘comment_content’] )> 500) {
wp_die ('Comment is too long. Please keep your comment under 500 characters.');
}
if (strlen ($ comment[‘comment_content’] ) <20) {
wp_die ('Comment is too short. Please use at least 20 characters.');
}
return $ comment;
}
NOTE:- IN THIS CODE YOU CAN ADD MAXIMUM CHARACTER INSTEAD OF 500 AND SET MINIMUM CHARACTER LIMIT IN PLACE OF 20.
Now Save Changes !!
In this way you can set the minimum and maximum length of the comment in your wordpress blog. This will not make any redundant comment in your blog and if you do it will only make valuable comment. If you are afraid to add code to your blog, then you can use Control Comment Length plugin.

We hope you enjoy reading this post. For blogging and internet information, keep visiting our blog.

Comments

Popular posts from this blog

Facebook's User DB — Is It SQL or NoSQL? - DZone Database

Facebook’s User DB — Is it SQL or NoSQL?

Facebook Creates Database of Online Political Ads ... - Fortune