Disable Auto Linking Of URLs (Clickable Links) In WordPress Comments

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on tumblr
Share on reddit

WordPress is flawless to a certain extent. It has some functionalities that people often see as problems. One of them is "auto-linking of URLs in the comments". Even if you put a text link in the comments section, WordPress will parse it automatically as a "clickable link".

I was just approving some of the unapproved comments on DigitalKube. I replied to one of the comments with a brief explanation of the person's query. I went on the front-end of the post where the comment was published to see if I've written everything correctly. The user posted some links in his comment which turned into clickable links instead of text links after approval.

Why does WordPress auto links URLs in the comments?

WordPress does that for the ease of moderation. WordPress does that just in case if a user is posting a comment with some reference links to strengthen his opinion. A clickable link makes it easy for the comment moderator or WordPress administrator to visit the link and see what it has.

But the problem is that not only on the backend, WordPress makes the links clickable even on the front-end of the live article where everyone can click it.

WordPress Comments URL Autolinking

It's a good thing but this feature encourages spam comments.

Today, I'm going to show you how you can easily disable this turning of plain text links to the clickable ones in the WordPress comments.

Disable Auto Linking of URLs In WordPress Comments

It's very easy to disable this functionality. Simply paste the code given below in your WordPress theme's functions.php file.

WordPress doesn't store the URLs in the comments in the database so this code is safe to use. It will safely disable the parsing of text URLs to hyperlinks.

Also, keep in mind that this will only filter the links that are posted as plain text. The links that are intentionally created using HTML or Markdown in your WordPress comments won't be disabled.

Hope this helps! If you have any queries regarding this tutorial then feel free to post them in the comments section below. Also, don't forget to check 6 WordPress plugins to make your site mobile responsive. Cheers 🙂

Best Managed WordPress HostingWPX Hosting
Best Managed Cloud HostingCloudways
Best Shared HostingSiteGround
Best Site & Page BuilderElementor
Beautiful WordPress ThemesElegant Themes
Lightest & Fastest WordPress ThemeGeneratePress
Best Lead Generation ToolOptinMonster
Best CDNStackPath
Best Domain RegistrarNamecheap

Related Posts

Ritesh Saini
Ritesh Saini
I’m a Professional Blogger & Internet Marketer living in India. Started my blogging and online marketing journey in 2013 when I was just 18 years old. You can see my work here on this blog and at criticecho.com

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.