Monday, 5 September 2016

How to Add  Breaking News Widget for Blogger 
This tool you view the latest news blog in the form of a horizontal to suit the templates blogger. 

Step 1 : Adding to Template
1) Go to Blogger Dashboard Template Edit HTML.
2) Now Find the code shown below using [ctrl+F] (Use In HTML Box)
</body>
3) Now Paste the Code Shown Below just Before it.

<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>
4) Customize your setting.Find any word click F3 or Ctrl+F.
Replace YOUR URL HERE with your site url past here.
5) Now Find the code shown below using [ctrl+F] (Use In HTML Box)
</head>
6) Now Paste the Code Shown Below just Before it.
<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>
 
7) Now save your template.
Step 2 : Add Widget to your blog
 1) Go to Blogger Dashboard LayoutPage Elements.
2) Add a HTML/JavaScript Gadget.
3) Paste below code in it.  
  
<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;'/>
5) Save your Widget.Don't forget to add the widget on the Center place. 



Related Posts:

  • Do You know your YouTube Ranking YouTube is easily one of the most recognized and popular sites when it comes to uploading videos. Making a YouTube account requires almost no effort and generally takes under a minute to complete, plus there are no hidde… Read More
  • What is P2P Torrent IPAddress Test? (adsbygoogle = window.adsbygoogle || []).push({}); P2P Torrent IP Address Test Since many users rely on a VPN to access Torrent websites, testing for security for P2P is also important. As a first step, visit … Read More
  • Does Google AdSense Drops Ad Limit Per Page Policy from Today August 23rd 2016? Updated: 10th September 2016 Still Google not officially announced about this officially. But i have noticed in most of the web sites increased their display ads. Many of the would be thinking that why G… Read More
  • Does Google Care About Your Keywords Meta Tag Google does not use the “Keywords” meta tag for its web ranking. Matt Cutt, Software engineer at Google, has explained in the embedded video below that this keyword was used a lot for spamming purposes. He also went ahead… Read More
  • How to Reach Your Twitter Audience ? Updated 15th September 2015 Tweeting on Twitter isn’t enough! You should concentrate on how you can increase the engagement with your Twitter followers. Make the Most of Your Profile Images Only three images can be added… Read More

0 comments:

Post a Comment

Sponsored Ads

Blog Archive

Share

Tracked By

Total Pageviews

44,116

Translate

Sponsored Ads

Are you using VPN? How to check How much Secure Your VPN ?

Work from Home - Earn Money

HOW TO EARN $100 OR $200 PER DAY WITH GOOGLE ADSENSE

Adsesne Publishers | What Does Google collect information while displaying ads in your site ?

How to Get Paid VPN FREE for One Year

Free Traffic Exchange

Do You Know about Invalid Activity in Google Adsense?

How to Select the Best VPN for your Need?

Popular Posts

Our Facebook Page