Easy Ways to Install Smart SEO Links on Blogs

Easy Ways to Install Smart SEO Links on Blogs
Easy Ways to Install Smart SEO Link on Blog - This time Arlina Design will share theSEO Smart Link  plugin which is a WordPress plugin that serves to change every word specified in an article into a link.

How the SEO Smart Link Plugin Works


This plugin will read every word you specify in the article. For example, if you add the word SEO or Blogger to the plugin, then automatically every word will change to a link if there is a word in your blog article.

How to Install SEO Smart Links


Open Blogger> Templates> Then add the code below before </body>

<script type='text/javascript'>
function smartLink(){
this.keywdHref = new Object();
this.add = function(keyword, href){
if(keyword.substr(0,1) != &quot; &quot;){keyword = &quot; &quot; + keyword;}
this.keywdHref[keyword] = href;
}
this.createAnchor = function(){
var objs = document.getElementsByTagName(&quot;div&quot;);
for(var i=0; i&lt;objs.length; i++){
var obj = objs[i];
if(obj.className.indexOf(&quot;post-body&quot;)&gt;-1){
var content = obj.innerHTML;
for(var keyword in this.keywdHref){
var href = this.keywdHref[keyword];
var newstr = content.replace(keyword, &quot;&lt;a href=&#39;&quot;+href+&quot;&#39;&gt;&quot;+keyword+&quot;&lt;/a&gt;&quot;, &quot;gi&quot;);
obj.innerHTML = newstr;

content = newstr;

}

}

}

}

this.startScript = function(){

var onLoad = window.onload;

window.onload = function(){

if(onLoad){onLoad();}

setTimeout(&quot;f.createAnchor()&quot;, 100);

}

}

}

</
script>
<script type='text/javascript'>
var f = new smartLink();

f.add(&quot;
SEO&quot;, &quot;http://th3safelink.blogspot.com/&quot;);
f.startScript();

</script>

If you want the plugin above to only appear on the posting page, please add a special conditional tag on the post page. 

References: Some Conditional Tag Functions in the Save Templates Widget

In the marked code, replace SEO with the keywords that you specify and replace https://th3safelink.blogspot.com/ with your blog url.
In the code above you can add other keywords below, for example 

f.add(&quot;SEO&quot;, &quot;http://th3safelink.blogspot.com/&quot;);
f.add(&quot;Template&quot;, &quot;http://th3safelink.blogspot.com/&quot;);
f.add(&quot;Blogger&quot;, &quot;http://th3safelink.blogspot.com/&quot;);

You can also add words to bold, for example

f.add(&quot;&lt;b&gt;SEO&lt;/b&gt;&quot;, &quot;th3safelink.blogspot.com/&quot;);

Note


It is recommended not to add excessive keywords, 1 to 3 keywords are enough.

Application example


Pay attention to the word Mobile and Friendly in the article on the demo page

So about the Easy Way to Install Smart SEO Links on a Blog , hopefully useful.

Post a Comment

أحدث أقدم