Iklan

How To Easily Install Smart Links in Blogger Blog

How To Easily Install Smart Links in Blogger Blog

This time * Go Widget * will share plugin * Smart _SEO Link_ * which is a WordPress plugin that works to change any given word in an article into a link.

How it Works Plugin SEO Smart Links

This plugin will read every word pal specified in the article. For example, if my friend added the word * SEO * or * Blogger * on the plugin, then automatically every time the word will turn into a link and only then if in your blog article contained the word.

How to Install Smart Links in Blogger Blog

1. Go to Blogger >> Template >> Then add the following code before the </ body>


Javascript - Go Widget

<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://widgetmefor.blogspot.co.id/&quot;);
f.startScript();
</script>

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


2. Save the template

At the marked code, replace * SEO * with the keywords you specify and replace * http://widgetmefor.blogspot.co.id/* with your blog url.


In the above friend can add other keywords below, as an example


Javascript - Go Widget

f.add(&quot;SEO&quot;, &quot; http://widgetmefor.blogspot.co.id /&quot;);
f.add(&quot;Template&quot;, &quot; http://widgetmefor.blogspot.co.id /&quot;);
f.add(&quot;Blogger&quot;, &quot; http://widgetmefor.blogspot.co.id /&quot;);


You can also add words into bold, for example


Javascript - Go Widget

f.add(&quot;&lt;b&gt;SEO&lt;/b&gt;&quot;, &quot;http:/widgetmefor.blogspot.co.id/&quot;);


* Note * It is advisable not to add excessive keyword, from 1 to 3 keywords is enough.

Similarly, about * How to Easily Install SEO Smart Links in Blog, may be useful ....

Next
Prev Post
Previous
Next Post
Buka Komentar