This smart link serves to change every keyword or a keyword on your blog into a link, both in the post and on the blog page.
In short, for you to understand, when you pre-install these smart link keywords , when your article has those pre-set words, it will automatically turn into an affiliate link (look at the code above). below will understand)
example: When you preset smart links SEO keyword "Blogger" for example, all of the posts on the blog or on your site that have the word "blogger" it will be automatically converted to links end.
Instructions to install smart link SEO
You insert the following Js on the /body . tag<script type="text/javascript"> | |
function smartLink(){ | |
this.keywdHref = new Object(); | |
this.add = function(keyword, href){ | |
if(keyword.substr(0,1) != " "){keyword = " " + keyword;} | |
this.keywdHref[keyword] = href; | |
} | |
this.createAnchor = function(){ | |
var objs = document.getElementsByTagName("div"); | |
for(var i=0; i<objs.length; i++){ | |
var obj = objs[i]; | |
if(obj.className.indexOf("post-body")>-1){ | |
var content = obj.innerHTML; | |
for(var keyword in this.keywdHref){ | |
var href = this.keywdHref[keyword]; | |
var newstr = content.replace(keyword, "<a href='"+href+"'>"+keyword+"</a>", "gi"); | |
obj.innerHTML = newstr; | |
content = newstr; | |
} | |
} | |
} | |
} | |
this.startScript = function(){ | |
var onLoad = window.onload; | |
window.onload = function(){ | |
if(onLoad){onLoad();} | |
setTimeout("f.createAnchor()", 100); | |
} | |
} | |
} | |
</script> | |
<script type="text/javascript"> | |
var f = new smartLink(); | |
f.add("hosting", "https://www.insurancefinances.com/search/label/hosting"); | |
f.add("adsense", "https://www.insurancefinances.com/search/label/adsense"); | |
f.add("make money online", "https://www.insurancefinances.com/search/label/make%20money%20online"); | |
f.add("insurance", "https://www.insurancefinances.com/search/label/insurance"); | |
f.add("wordpress", "https://www.insurancefinances.com/search/label/iphone"); | |
f.add("ThemeForest", "https://www.insurancefinances.com/search/label/ThemeForest"); | |
f.add("marketing", "https://www.insurancefinances.com/search/label/marketing"); | |
f.startScript(); | |
</script> | |
You can also bold or italicize keywords as follows:
f.add("<b>SEO</b>", "https://www.insurancefinances.com/");and add more keywords also.
f.add("<i>SEO</i>", "https://www.insurancefinances.com/");
Note
Even though a blog post has multiple targeted keywords, this smart link will only change the keyword to a link at the top or the first keyword, so the next keyword will still be plain text. often.If you want to enable it only in blog posts, you can add a conditional tag to the javascript code above.
Post a Comment
Post a Comment