The blogger comments are used to replay or suggest or asking questions about that post. But many spammers, seo's are using this comments post to add their site or blog links through comments. This a another way of getting users from other sites. If you approve any un-wanted links to the users, then there is a many chances for your users to go to spammers site via your site. So don't allow these kinds of spam links to your blogs. Note: By default all the links in bloggers are "no-follow" links. This tutorial explains how to hide or remove spam url comments automatically to your blog.

Blogger Spam Comments Logo

How to Automatically Hide / Remove Comments URL from Blogger Blog

If you really want to automatically delete or hide the spam url links from the blogger post comments page, follow these steps.

Step 1: Before changing updates in template, make a back-up for your blogger template. It is very useful to avoid issues after changing the template. If you get any problem after modifying your template just re-upload your backup template, issue will get fixed.


For Backup your template, Just goto template in blogger dashboard then click "Backup/Restore" button from right corner, then save it to your local drive.

Step 2: Now goto your Blogger dashboard -> Design-> Template -> Edit HTML

blogge template edit html tutorial

Click Edit HTML button.

Now find the </body> from template source. After finding this tag, just add following two lines to above that <body> tag to remove or hide spam url comments.

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});</script>

For Example,
After adding this code to your template, your code will like this,
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});</script>
</body>

Save your blogger template and that’s it. You have successfully automatically hide or remove spam url comments from your blog posts.

0 comments:

Post a Comment

 
Dine Tricks © 2014. All Rights Reserved. Powered by Blogger
Top