Monday, November 23, 2020
Home Blogging How to Disable Auto Linking of URLs in WordPress Comments

How to Disable Auto Linking of URLs in WordPress Comments

Do you know that when a consumer provides a plain textual content URL of their feedback, WordPress mechanically makes it clickable. Just lately, considered one of our readers requested us if it was potential to disable auto-linking of textual content urls in WordPress feedback? The reply is YES. On this article, we are going to present you how one can disable auto-linking of URLs in WordPress feedback.

Why WordPress Autolinks Textual content URLs in Feedback?

WordPress mechanically converts textual content URLs into hyperlinks which makes it simpler to go to the hyperlink whereas moderating feedback.

This auto-linking is just not saved in your database. WordPress makes URLs clickable when displaying them on display in admin space in addition to feedback part under your articles.

A few of these feedback are real the place commenters didn’t know how one can add a hyperlink in feedback. However many spam feedback additionally include plain URLs pasted instantly within the remark textual content.

Disabling Auto-Hyperlink in WordPress Feedback

Merely add this single line of code in your theme’s capabilities.php file or in a site-specific plugin.

1
remove_filter( 'comment_text', 'make_clickable', 9 );

WordPress doesn’t retailer plain textual content URLs as hyperlinks within the database. As an alternative it modifications them into clickable hyperlinks on the fly. This code merely disables the filter that makes URLs clickable.

This makes plain textual content URLs non-clickable in admin space and feedback part under your posts. Eradicating this code will re-enable the auto linking.

If you’re including it to your theme’s capabilities.php file, then updating your theme will overwrite your capabilities file.

Additionally remember the fact that this code solely works on plain textual content URLs. If a consumer determined to create a hyperlink by including the right HTML tag, then these hyperlinks will seem as they need to.

If you wish to full flip off any HTML in feedback, then check out our tutorial on how one can disable HTML in WordPress feedback.

You May Also Like : How to Restore a WordPress Site with Just a Database Backup

We hope this text helped you disable auto linking of URLs in WordPress feedback. You may additionally wish to see our checklist of 16 finest plugins to enhance WordPress feedback.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

50 Best Online Jobs From Home For Students – Earn 20K PM

In latest years, the alternatives for online jobs from home for students have gained great reputation. This is as a result of many of the...

Best Answers to the Question “Why should you be hired for this Internship?”

What is the greatest approach to ace an internship interview? Especially for a more energizing who has by no means appeared for a job-related...

Does Instagram Notify You if Someone Screenshots Your Story?

When Snapchat first burst on the scene, there have been loads of individuals very completely happy concerning the prospect of sending pictures to people...

How to Change Background Color on Instagram Story

It's arduous for me to recollect Instagram earlier than the tales characteristic was launched — it is a simple possibility for sharing updates and...

Recent Comments