I’ve launched my new WordPress blog and am shocked at the bad language of people who are leaving comments. Not everyone, but a couple of people. I hate it. Can I filter out or edit their obscene comments?
While there are some people who use a lot of crude language when you are with them face to face, there are many more who vent online, using far more colorful language than they would in person. Certainly, obscenities are valid and reasonable language and one person’s shocking crude language is something another person might just view as being emphatic or passionate. Still, there are community decency laws and, more importantly, if it’s your blog, you can do what you want anyway. You are under no legal, moral or ethical obligation to allow everyone to comment and respond, whether they agree with you or emphatically disagree.
WordPress has long had filters and capabilities to make this easy too. There are three main approaches; you can simply delete posts from specific individuals or posts that mention certain words or phrases, you can automatically mark comments that match your rules for moderation, not automatic publication, or you can actually go and edit comments to remove the vulgar language.
Let’s start with the easiest. Go into the Dashboard on your WordPress backend, then go to Settings > Discussion and you’ll find this:
As you can see, I have mine set to moderate any comment that has a link of any sort (I’m very careful about where I’ll let people link when they leave a comment). Below that, however, is a box where you can add user email addresses, Web site URLs or a list of words or phrases that you just can’t stand and don’t want on your site. Generally speaking once commenters find their comments aren’t being published, they slow down or change their language anyway.
Automatically Trash Comments
But let’s say that you don’t want to have to read these comments at all. Instead, you can specify words or phrases (or email addresses or Web site URLs) that cause comments to instantly be moved to the trash. You can do that too:
You do need to be a bit judicious with this because used too enthusiastically and you might never see another comment again. Imagine if you specified “the” or “and” in this box, for example! :-O
Editing WordPress Comments
And, finally, WordPress lets you delve into individual comments and edit them to change words or, as I often do, fix spelling errors. That starts in a different area, so in the backend of your WordPress blog, go to Comments. It’ll look like this:
It’s that search box you want to use. Search for the words you dislike and it’ll show you all the comments that contain that word or phrase. For example, if I search for “stupid”…
Just below the search box you can see that I have a rather staggering 425 comments that include the word “stupid”. That’s, uhm, annoying. If it were a word I just loathed and didn’t want on my site, that’s going to be a challenge.
Once you find a comment that includes the word, let’s say you do want to tweak their comment to remove the word. For example:
If you don’t see the strip of options including Unapprove | Reply | Quick Edit, etc, move your cursor over that particular comment to have it revealed. Now click on “Quick Edit” and you’ll get a little edit box on this same page:
I’m going to rephase this so it doesn’t say “stupid mac” but my choosing to do that is already bordering on questionable behavior. It would be just as easy for me to change this to say something entirely different! Please use this feature judiciously. There’s no law that you can’t tweak things, but changing the intention or sentiment of what someone says is definitely poor practice. Clean up their language, remove an obscenity or two, fix some spelling mistakes, sure, but changing “I hate it” to “I really love it” is just going to cause huge upset. It fails the Golden Rule anyway; you wouldn’t want someone to do that to your comments on their blog, would you?
Comment updated I click on “Update Comment” and here’s the (slightly) improved comment from Suzanne:
So “stupid mac” became “a Mac”. Easily done.
Between those three options, you should be able to clean up your WordPress blog comments in no time!
Pro Tip: I’ve been writing about WordPress for quite a few years. Please check out my extensive WordPress help library of tutorials while you’re visiting. Thanks!