Automatically link keywords in blogger

    As per OnPage SEO requirments, you have to add internal links in your post so if you don't know it, you need to add links or replace, a editable link but you can't do it for SEO as will be ignored bounce rates.
    Automatically link keywords in blogger

    So this has them with an awesome JavaScript code, which will add the selected link in any file but the least one and if you want to edit and replace in all of these articles, you can use one File name in image only. All keywords in this section will be converted into the link. It is not possible to automatically add links on keywords for it to be converted auto link. Internal links are very important for creating bounce rate data, and useful for on-page SEO.

    Features::

    1.) Pure JavaScript Code.
    2.) Ne External File.
    3.) Will Effect On All Pages Of Blog.
    4.) Just To Edit Template At Once.
    5.) Can Add InnerLink And Desired Text IN Codes That Will Be Put In Content Automatically.
    6.) Can Add Unlimited Links.
    7.) Will Effect On Post Body Only.
    8.) Fast To Load And Quick To Add.
    9.) SEO Will Crawl This.
    10.) Will Decrease Your Bounce Rate.

    How To Add In Blogspot?

    1.) Pure JavaScript Code.
    2.) Ne External File.
    3.) Will Effect On All Pages Of Blog.
    4.) Just To Edit Template At Once.
    5.) Can Add InnerLink And Desired Text IN Codes That Will Be Put In Content Automatically.
    6.) Can Add Unlimited Links.
    7.) Will Effect On Post Body Only.
    8.) Fast To Load And Quick To Add.
    9.) SEO Will Crawl This.
    10.) Will Decrease Your Bounce Rate.

    How To Add In Blogspot?

    1.) Go To Your www.blogger.com
    2.) Open Your Desire Blog.
    3.) Go To “Template“.
    4.) Click “Edit HTML“.
    5.) Now Click Within Code Box.
    6.) Press [CTRL+F] To Search </head> Code.
    7.) Now Copy The Below Code And Paste It Before </head> Code.

    <script type='text/javascript'>
     //<![CDATA[ 
     function doHighlight(bodyText, searchTerm, link) {
     var newText = "";
     var i = -1;
     var lcSearchTerm = searchTerm.toLowerCase();
     var lcBodyText = bodyText.toLowerCase();
     while (bodyText.length > 0) {
     i = lcBodyText.indexOf(lcSearchTerm, i + 1);
     if (i < 0) {
     newText += bodyText;
     bodyText = "";
     } else {
     if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
     if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
     newText += bodyText.substring(0, i) + '<a href="' + link + '">' + bodyText.substr(i, searchTerm.length) + '</a>';
     bodyText = bodyText.substr(i + searchTerm.length);
     lcBodyText = bodyText.toLowerCase();
     i = -1;
     }
     }
     }
     }
     return newText;
     }
    
     function highlightSearchTerms(searchText, treatAsPhrase, link, divid) {
     if (treatAsPhrase) {
     searchArray = [searchText];
     } else {
     searchArray = searchText.split(" ");
     }
     div = document.getElementById(divid);
     var bodyText = div.innerHTML;
     for (var i = 0; i < searchArray.length; i++) {
     bodyText = doHighlight(bodyText, searchArray[i], link);
     }
     div.innerHTML = bodyText;
     return true;
     }
     //]]>
    </script>
    8.) Now Click Within Code Box.
    9.) Press [CTRL+F] To Search  Code.
    10.) Now Copy The Below Code And Paste Replace It With  Code.
    11.) Do The Same If You Found  Many Time.
    <div expr:id='&quot;summary&quot; + data:post.id'>
     <data:post.body/> </div>
    <script type='text/javascript'>
     highlightSearchTerms('keywords1', true, 'URL of the post1', 'summary<data:post.id/>');
     highlightSearchTerms('keywords2', true, 'URL of the post2', 'summary<data:post.id/>');
    </script>
    
    12.) Click “Save Template” And Done.

    Customization::

    1.) Now replace .”keywords1″, “keywords1″ with your desired keywords on which you want to add link.
    2.) Now replace .”URL of the post1”, “URL of the post2” with your desired URL of the respectively mentioned keywords post.
    3.) You can add more link by just adding highlightSearchTerms('keywords2', true, 'URL of the post2', 'summary'); more and more.

    No comments