About & Social

0
Breaking News widget is very useful to the News Blogs and even Niche blogs, because new users who are visited to the site from the Google may only see the information what they need and they will not return to the home page for more information. So at that time this breaking news widget will be very useful to the users. It will show the total post titles which you written in your blog. So follow according to the below process.


Breaking News Widget for Blogger

How to Add New "Breaking News Widget for Blogger "

  • Log in to your Blogger Account and Go to your Blogger Dashboard
  • Click on Now  -> Template -> Edit HTML
  • Now find the </head> By pressing Ctrl+F (Windows) or CMD+F (Mac)
  • Copy this Code from below and Paste it above/before </head>
<!-- Breaking News https://www.gulpatech.com--><b:if cond='data:blog.pageType != &quot;static_page&quot;'><b:if cond='data:blog.pageType != &quot;item&quot;'><style type='text/css'>#beakingnews{width:980px;margin:0 auto;line-height:25px;height:25px;background:#F7F7F7;overflow:hidden;margin-top:5px;}#beakingnews .tulisbreaking{display:block;float:left;padding:0 7px;margin:0 5px 0 0;color:#FCFCFC;background:#5F0000}#recentpostbreaking{float:left}#recentpostbreaking ul,#recentpostbreaking li{list-style:none;margin:0;padding:0}</style>  </b:if></b:if><!-- Breaking News https://www.gulpatech.com-->
  • Search for </body>
  • Copy and Paste the below code before </body>
<!-- Breaking News https://www.gulpatech.com--><b:if cond='data:blog.pageType != &quot;static_page&quot;'><b:if cond='data:blog.pageType != &quot;item&quot;'><script type='text/javascript'>//<![CDATA[$(document).ready(function () {var url_blog = 'YOUR URL HERE', //replace with your Domain    numpostx  = 10; //Posts want to display$.ajax({    url: '' + url_blog + '/feeds/posts/default?alt=json-in-script&max-results=' + numpostx + '',    type: 'get',    dataType: "jsonp",    success: function(data) {        var posturl, posttitle, skeleton = '',            entry = data.feed.entry;        if (entry !== undefined) {            skeleton = "<ul>";        for (var i = 0; i < entry.length; i++) {                for (var j=0; j < entry[i].link.length; j++)                {                     if (entry[i].link[j].rel == "alternate")                        {                            posturl = entry[i].link[j].href;                            break;                         }                }                posttitle = entry[i].title.$t;            skeleton += '<li><a href="' + posturl + '" target="_blank">' + posttitle + '</a></li>';        }            skeleton += '</ul>';            $('#recentpostbreaking').html(skeleton);            // kode untuk efek pada breaking news            function tick(){            $('#recentpostbreaking li:first').slideUp( function () { $(this).appendTo($('#recentpostbreaking ul')).slideDown(); });            }        setInterval(function(){ tick () }, 5000);        } else {            $('#recentpostbreaking').html('<span>No result!</span>');        }    },    error: function() {            $('#recentpostbreaking').html('<strong>Error Loading Feed!</strong>');       }});});//]]></script>
  </b:if></b:if><!-- Breaking News https://www.gulpatech.com-->
Customization: Replace "Your Url Here" with your blog URL.

Now go to.....
  • >>Layout..
  • >>Add a Gadget
  • >>HTML/JavaScript 
  • Paste the below code in the Gadget.

<!-- Breaking News https://www.gulpatech.com--><b:if cond='data:blog.pageType != &quot;static_page&quot;'><b:if cond='data:blog.pageType != &quot;item&quot;'><div id='beakingnews'><span class='tulisbreaking'>Breaking News</span><!-- tag pembuka tempat Breaking News--><div id='recentpostbreaking'>Loading...</div><!-- tag tempat daftar Breaking News ditampilkan--></div><!-- tag penutup tempat Breaking News-->  </b:if></b:if><div style='clear: both;'/><!-- Breaking News https://www.gulpatech.com-->


I hope you do not understand any problem in any kind of comment, I know there is a problem, then I will try to help.

Post a Comment

Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.