‫In this lecture of the course, we will be taking a look at the comments for a blog website.
‫Now, comments are really very important for a blog website, so let's understand how the comments work.
‫What is actually a comment?
‫So you may have used any of the social media platform.
‫And when you basically share something, you publish a post, you share your photos.
‫Then you allow other people to interact with that photo by sharing their views on that photo or whatever
‫you have shared.
‫All right.
‫So the medium through which their share, their opinion is actually the comment like beneath every single
‫post, whether it's on Instagram or Facebook, you see a comment option that people can comment now,
‫even on YouTube.
‫Uh, there is a comment section in people, uh, people can actually share their views based on your
‫post, whatever you have posted.
‫So that is why this is, uh, a basic, simple rule that when you share your message, you have to also
‫take others message as well and how you will take it.
‫You have to allow comments on your website.
‫Now, it's not, uh, like necessary.
‫If you want, you can also disable the comments from your website.
‫And you, uh, like you can say that.
‫Okay, I do not want to allow anyone to comment on my website, but similarly you can.
‫If you want to allow it, then how you can do that?
‫Or if you do not want to allow it, then how you can do that on a blog website, you will take a look
‫at it.
‫So first of all, let's just go ahead and let's click on this post and let's go down.
‫And now you can see that I have got this.
‫Leave a reply I'm logged in and I can edit my profile.
‫And I can also click on Log Out.
‫Now this is going to be shown to the logged in users.
‫Since we are actually the administrator and we own this website and we write post.
‫Now let's suppose that I want to write as myself.
‫Then I can add a comment here.
‫Or let's suppose that if anyone else wants to write a comment, then how you're going to do that.
‫For that you have to open up incognito window.
‫If you are using the Mac, you can press Command shift n.
‫If you are using the windows, press Control shift N, and this is going to open up the incognito window
‫in the chrome.
‫So once you have basically opened that then you have to type in your address.
‫After that.
‫This is how the website is going to, uh, be publicly displayed for the public user.
‫So you can click on any of the post, be taken to that particular post, and then you will go down.
‫You can see that now we have got this.
‫It says your email address will not be published.
‫However the required fields are marked which is name, email and the comments.
‫Like whatever you want to post, it's up to you if you want to add your website or not.
‫Similarly, there is also an option to save my name, email and website in this browser for the next
‫time I comment, which is going to be saved based on a cookie.
‫So now how are we going to customize these settings?
‫How are we going to basically work with it for that?
‫There is basically an option inside the dashboard.
‫So if you go into the dashboard and now you go into the settings, then you can see that we have got
‫this discussion.
‫And if you click on that, these are all the common settings that you can work with.
‫Now.
‫Now I'm going to be sharing with you some of the main and the most important settings that you can work
‫with.
‫Like those are mostly the one that you should be working with.
‫However, if you want to dive in deeper into this like you want to understand each and every of the
‫settings that are being shown, then I'd recommend you to head over to this website.
‫This is the official WordPress website.
‫WordPress.org slash documentation, slash article slash comments, and WordPress.
‫This is the link that I will be attaching in the resources and what you can do.
‫You can click on that and then you can basically read this documentation.
‫It explains everything in detail like how are the settings being done.
‫So let's just go ahead and let's take a look at the basic settings that you can do.
‫So now let's suppose that if you want to disable comments completely from from your particular website,
‫then what you can do, you can click on this check.
‫And this is not going to allow the people to post comment on the your particular website.
‫Now, if I just go ahead and if I uncheck this and then if I click on save changes.
‫Now if I visit this website and now if I refresh this page, you can see that it still asks me to leave
‫a comment.
‫And the reason for that is because this setting is going to be applied to all of the new posts that
‫you will be adding on the website for the previous post that you have already posted.
‫You have to go into each of the individual posts, you have to click on the edit and then you have to
‫go down.
‫And here it says discussion.
‫You have to uncheck this allow comments.
‫And this is not going to allow that.
‫So this is going to be applied to all of the new posts that you will be adding.
‫Similarly in any of the posts like let's suppose that you do not want to allow the comments, you can
‫uncheck that and it's not going to allow that.
‫So let's uncheck this.
‫Let's hit on update.
‫Let's also go down and save the changes for this one that we have checked right now.
‫And now let's just go here and let's refresh.
‫And you can see that there are no comments option because I have basically disabled comments for this
‫particular post.
‫Only if I were to open any other post besides that, then that is going to show me the comment option.
‫So this is how it is actually working.
‫Similarly, you can also close the comments on post older than 14 days or whatever days you set over
‫here.
‫Now, the reason for that is because let's suppose that you are building a news website and something
‫politically happens in the world, and you have shared your views about it.
‫Now, uh, after 30 days, your views doesn't really matter, because now there is going to be another
‫political event that is going to be happening and people will be talking about that.
‫So that is why it's up to you.
‫If you want, you can also close the comments on post older than the X days.
‫So after that we have got this.
‫Anyone post a comment?
‫Email me a comment is held for the moderation.
‫Email me.
‫So if there is any of the comment that is going to be posted on any of your post, you are going to
‫get an email that you will be entering in the general tab.
‫And also if there is any of the comment that requires the moderation, you are going to get the email.
‫Now what is actually a moderation?
‫So basically let's suppose that someone posts a comment.
‫Now do you want to approve it or do you want that comment to be posted automatically on the website?
‫You can do it like that.
‫And these are the settings for that.
‫So it says comments must be manually approved.
‫If you select this, then all of the comments that will be posted on your particular blog post, you
‫will have to manually approve them in the comment step.
‫Similarly, here is another option that says comment author must have a previously approved comment.
‫So what does this mean?
‫This actually means that the comments will be manually approved.
‫All right.
‫Uh, if you select this and you will have to approve all of the comments.
‫However, regarding this, uh, if any of the user like, let's suppose that there is a user that is
‫x, y, z at the rate gmail.com.
‫Now this is the user that has got, uh, one of a comment approved on the website, and now he leaves
‫a comment on any other post.
‫Then that particular comment is going to be automatically approved because this x, y, z at the rate
‫gmail.com has a previously approved comment.
‫So this means that then we have got this, which is another part of the moderation.
‫And this means that.
‫Hold the comment in the moderation if it contains two or more links.
‫Now you can also set this to one, like if anyone has posted a comment and in which comment there is
‫actually a link to a website, then you can hold that comment for the moderation so that you can check
‫the website, that okay, that website is actually legitimate and then you can allow that on your blog.
‫Similarly, there is also a text box text area given here that let's suppose that, uh, we want to
‫disallow or we want to catch some words like someone.
‫Let's suppose that someone post a comment with the word kill, or someone post a comment with a word
‫bad, or someone post a comment with a word worst.
‫So let's suppose that if these words are actually in a comment, then we are going to hold that for
‫the moderation.
‫All right.
‫And then uh, basically we can approve that comment manually on the website.
‫So if any of the comment contains these words similarly you can also enter the IP address of that particular
‫user, like if you are getting most of the spam comments from that particular IP address.
‫And you can also enter that IP address.
‫Or let's suppose that, uh, there is a domain name that is x y z.com.
‫All right.
‫And someone has, uh, multiple email address from this domain.
‫Or you can simply do it like this.
‫Like there is a service called temp dash mail.
‫And let's suppose that someone basically creates a temporary email address from this particular service.
‫Now this is basically a service that provides temporary email address for the verification purposes.
‫Like you can add this email address and then you can get some of the oatps.
‫Now let's suppose that if someone is using this particular service and they are using this domain name,
‫then what you can do is that you can copy this domain name as well.
‫And now you can go into the discussion settings and you can paste that domain name in here.
‫All right.
‫And the.com.
‫Now if their email address contains this domain name then that is going to be also held in the moderation.
‫So these are the things that you can do.
‫After that we have got the disallowed common keys.
‫Now this means that if any of the words like any of the word that you add in here, like, let's suppose
‫that if this is.
‫Actually the word that is in any of the comment.
‫Then what I want to do is that I want to delete that comment automatically.
‫So if there is going to be any of the word that contains this word, any of the comment that contains
‫this word, then that comment is going to be automatically deleted.
‫So you can do these kind of things.
‫Now these were the basic settings that you should know.
‫All right.
‫So once you are done with that then you can just go ahead and you can click on Save Changes and your
‫settings are going to be saved.
‫Now let's just go ahead and let's post a comment from this on this page using this email address.
‫Let's just go ahead and let's enter the name which is going to be test.
‫And this is going to be a comment which is going to be hello world.
‫All right I'm going to go ahead.
‫I'm going to save the name, email and website in this browser for the next time.
‫And I'm going to hit on comment.
‫Now this is going to be saved in the incognito window to comment is posted.
‫This is a hello world test and it is now awaiting the moderation.
‫Now if I just go ahead and if I reload the page then you can see that I have got a comment posted.
‫Similarly, I have also got an email from the website as well that says a new comment is awaiting my
‫moderation and this is the email that I have got.
‫Now if your website is on localhost, you are not going to get the emails.
‫So if your website is actually hosted online on any of the servers, then you are going to get the email.
‫Now let's suppose that I want to approve this comment.
‫So I'll be going into the comments.
‫And now I can go ahead and I can click on approve.
‫And this comment is going to be now approved.
‫And if I refresh this now you can see that this is the comment.
‫Now what I can do is that I can also reply to this comment.
‫So let's suppose that I want to reply and I want to say aha.
‫And I want to reply.
‫Now this is my reply to this as well.
‫And now what I will do is that I will view this post.
‫And now if I go down now, you can see that this is the comment that was posted.
‫And now this is my reply.
‫Now the next time, next time when this user, this xyz at the rate gmail.com is going to post a comment
‫on any of the post.
‫All right, so let's suppose that this is the Ferrari post.
‫The user wants to post a comment in it or this five days budget one.
‫The user wants to post a comment in it and he says this and then he just clicks on post comment.
‫Now this comment is going to be automatically posted because this user has already posted on our website
‫using his email address.
‫And if we go into the dashboard and if we go into the comments.
‫Now you can see that this comment is already approved because in our discussion settings you can see
‫that we have got this comment.
‫Author must have a previously approved comment before that gets automatically approved.
‫If in case if I have selected that comments must be manually approved, then I will have to reapprove
‫this again for this particular comment to be appeared on the website.
‫So this is how you can go ahead and you can work with the comments on your website.