It is always advisable to change blog comment attribute to nofollow or remove comments links completely in other to save your blog from panda effect. If you have been dealing with all sort of spam comments and you are so busy to review all comments, then this new blogger hack will help you with that by removing any link included in comments and replace it with ordinary text using jQuery.
If you have been using jQuery library in your blog, then skip the above step and move to the next step.
The code above works for blogger threaded comment, in case you are using the old blogger comment, then use the code below.
Hope you found this useful? take few seconds to share it with friends/followers you think this might be of interest to.
How To Remove Links In Comments
- Go to your dashboard
- Click on Template > Edit HTML > Proceed (Mark/Tick Expand Widget Template)
- Use ctrl F to find </body> and paste the following code above/before it.
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
If you have been using jQuery library in your blog, then skip the above step and move to the next step.
- Now paste the following code above </body>
<script>
$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
</script>
$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
</script>
The code above works for blogger threaded comment, in case you are using the old blogger comment, then use the code below.
<script>
$('.comment-body p a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
</script>
$('.comment-body p a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
</script>
Hope you found this useful? take few seconds to share it with friends/followers you think this might be of interest to.
0 comments:
Post a Comment