You probably don’t want to remove all the comments that contain links nor you want your users to leave your site through that link. I have found a solution for this problem. Now with this trick you will learn how to open all the links in the comment section in a new tab, how to remove the link in the comment without removing the anchor text OR to eliminate the comment completely. Let’s get started.[sc name=”list-nonReversed” color=”#4f597b” ] [mks_toggle title=”How to add hyperlinks in blogger comments?” state=”close “]
Typing out links in blogger comments won’t make it a clickable link. To add a hyperlink in blogger comment, you have to type the HTML code. Here is how the HTML code will look like for a hyperlink.
<a href="LINK_HERE">ANCHOR TEXT HERE</a>
All links added in blogger comments are nofollow by default.[/mks_toggle]
Also read : Check whether a link is dofollow or nofollow
Open Blogger comment hyperlinks in new tab
Follow the steps given below to force all comments in blogger comments to open in a new tab.
- Log in to your blogger account.
- Go to your blog dashboard.
- Navigate to Template and click on Edit HTML.
- Hit Ctrl + F and search for </head>. Paste the following code just above it.
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
- Click Ctrl + F and search for </body>
- Paste the following code above </body> tag.
<script> $(function(){ $('.comment-content a[rel$=nofollow]').attr("target","_blank"); }); </script>
- Save the template and you are all done!
Remove the link only (Anchor text will not be removed)
Follow these steps if you want to remove the hyperlink only. The anchor text will not be removed.
- Go to the template section in your blog and hit edit HTML.
- Paste the following code just above </head>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
- Search for </body> tag (Ctrl + F).
- Paste the following code just above it.
<script> $('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());}); </script>
- Save the template!
Delete the entire comment
To do that, just click on the delete button located below the comment.
If you are having any trouble, then let us know in the comments.
Read Next : 5 blogger tricks that you must know
Um, right. I’m going to put a script that I don’t understand, written by a stranger, into my blog. Sure. I suppose next you’re going to try to sell me the Brooklyn Bridge.