WordPress Comments में Auto Linking URL Disable कैसे करें?

Wordpress blog me comments me auto linking URL disable ya bandh kaise kare? simple plain text link aur html tag link dono disable ya bandh karne ke bare me hindi jankari

WordPress ब्लॉग में जब कोई विज़िटर comment में URL डालता है, तो वह अपने आप clickable link में बदल जाती है। अगर आप WordPress comments में auto linking URL को बंद करना चाहते हैं, तो हम यहाँ तरीका बता रहे हैं।

इस method से आपको manually comments में से लिंक हटाने की जरूरत नहीं पड़ेगी और आपका समय भी बच जाएगा। जब आप WordPress comments में auto linking disable कर देंगे, तो कोई भी विज़िटर comments में लिंक डालें, वह केवल text के रूप में दिखाई देगा और उस पर क्लिक नहीं किया जा सकेगा। इससे आप अपने ब्लॉग को spam comments attacks और unwanted links से भी सुरक्षित रख सकते हैं।


How to disable auto linking URL in wordpress comments

WordPress comment box में जब कोई विज़िटर URL डालता है, तो वह अपने आप clickable link में बदल जाती है। इसका कारण यह है कि ब्लॉग के admin और अन्य विज़िटर उस लिंक पर क्लिक करके comment करने वाले की वेबसाइट या ब्लॉग को visit कर सकें।

लेकिन ब्लॉग पर कई बार spam comments भी आती हैं। Spam comments से ब्लॉग पर negative effect पड़ सकता है और Google से penalty भी मिल सकती है।

अगर आप भी अपने ब्लॉग को spam comments से सुरक्षित रखना चाहते हैं, तो WordPress comments में auto linking URL को बंद कर देना चाहिए। इससे कोई भी विज़िटर comment में लिंक डालें, वह केवल text के रूप में दिखाई देगा और उस पर क्लिक नहीं किया जा सकेगा।

ReadWordpress blog me email subscriber box add kaise kare?

WordPress comments में auto linking URL disable करने पर कोई भी user comments box में link/URL नहीं जोड़ पाएगा। अगर कोई URL डालता भी है, तो वह केवल text version में दिखेगा, यानी clickable link नहीं होगी।

इससे आपके ब्लॉग को spam links का खतरा नहीं रहेगा और ब्लॉग spam attacks से सुरक्षित रहेगा। ऐसे users जो केवल URL डालने आते हैं, वे रुक जाएंगे।

WordPress comments में auto linking URL disable करने के लिए आप No Comments Links plugin का भी उपयोग कर सकते हैं। लेकिन यहाँ हम plugin का उपयोग नहीं करेंगे। इसके लिए हम manually code add करेंगे और comments से auto linking URL को बंद करेंगे।

WordPress comments me auto linking URL disable kaise kare?

हम यहाँ plugin का उपयोग नहीं करके, manually code add करके comments में URL को बंद करने का तरीका बता रहे हैं। सबसे पहले आपको WordPress Dashboard खोलना है। फिर Editor में जाकर functions.php फ़ाइल खोलें और नीचे दिया गया code copy करके paste कर दें


//Disable URL Auto-Linking in WordPress Comments

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

इस code से WordPress comments में auto linking URL disable हो जाएगा। इसका मतलब यह है कि कोई भी user आपके ब्लॉग में comments में URL add करे, तो वह clickable link में नहीं बदलेगा। URL केवल text के रूप में दिखेगा और उस पर क्लिक नहीं किया जा सकेगा।
इससे आपका ब्लॉग spam links और unwanted clickable URLs से सुरक्षित रहेगा।

ReadWordpress blog me social media share button add kaise kare without plugin

लेकिन अगर कोई HTML code के माध्यम से comments में URL डालता है, तो यह code काम नहीं करेगा। इसका मतलब है कि user HTML tag का इस्तेमाल करके link जोड़ सकता है। यह code केवल simple plain text URL को disable करता है। अगर आप HTML tags में URLs को भी WordPress comments में बंद करना चाहते हैं, तो उसके लिए अलग तरीका अपनाना होगा, जिससे comments में HTML tags की लिंकिंग को भी block किया जा सके।

Disable HTML in wordpress comments

अगर आप WordPress comments में HTML tag links को भी बंद करना चाहते हैं, तो आपको इस method को इस्तेमाल करना होगा।

सबसे पहले WordPress Dashboard खोलें।
फिर Editor में जाकर functions.php फ़ाइल खोलें और नीचे दिया गया code copy करके उसमें paste कर दें:



// This will occur when the comment is posted
 function plc_comment_post( $incoming_comment ) {
// convert everything in a comment to display literally
 $incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
// the one exception is single quotes, which cannot be #039; because WordPress marks it as spam
 $incoming_comment['comment_content'] = str_replace( "'", ''', $incoming_comment['comment_content'] );
return( $incoming_comment );
 }
// This will occur before a comment is displayed
 function plc_comment_display( $comment_to_display ) {
// Put the single quotes back in
 $comment_to_display = str_replace( ''', "'", $comment_to_display );
return $comment_to_display;
}

इस method से कोई भी commentator WordPress में HTML comment नहीं कर पाएगा। मतलब, अगर comments में HTML code add किया जाए, तो वह काम नहीं करेगा और केवल plain text के रूप में दिखेगा।

अगर आप यह method manually नहीं करना चाहते, तो WordPress comments में HTML tags बंद करने के लिए आप Peter’s Literal Comments plugin का भी उपयोग कर सकते हैं। यह plugin automatically सभी HTML tags को disable कर देता है और comments को सुरक्षित बनाता है।


ReadWordpress theme customize kaise kare?

इस तरह हम अपने WordPress ब्लॉग को spam link comments से सुरक्षित रख सकते हैं।

इन दोनों तरीकों से WordPress comments में कोई भी plain text link और HTML tag link add नहीं कर सकता।

अगर आपको यह आर्टिकल – “WordPress comments में auto linking URL कैसे disable करें” पसंद आया, तो इसे share जरूर करें

تعليق واحد

  1. hi sir techeib.com Greetings! Very useful advice within this article!
    It’s the little changes which will make the biggest changes.
    Thanks a lot for sharing!

Send Whatsapp Query