Easy Ways to Install SEO Links on Blogs (2020)

Easy Ways to Install SEO Links on Blogs (2020)

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://stressthinking.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://stressthinking.blogspot.com/ with your blog url.

You may like these posts