Breaking News
Loading...

Connected

Responsive Ad

HOW TO ADD BREAKING NEWS ON BLOGGER

HOW TO ADD BREAKING NEWS ON BLOGGER

HOW TO ADD BREAKING NEWS ON BLOGGER
HOW TO ADD BREAKING NEWS ON BLOGGER


Today i will teach you in 3 step how to add breaking new on blogger site. This tool you view the latest news blog in the form of a horizontal to suit the templates blogger.

Step 1: 

1. Go to: Blogger Dashboard> Template> Edit HTML.
2. Find the code shown below using [ ctrl+F] you will see search box, type in search box </body>
3. Now Paste the code shown below.
-------------------------------------------------------------
<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 = 'https://kebaremaijankari.blogspot.com', //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>
-------------------------------------------------------------
Step 2: 
1.Find the code shown below using [ ctrl+F] you will see search box, type in search box </head>
Now Paste the code shown below. 
Save the Template.
-------------------------------------------------------------
<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>
-------------------------------------------------------------
Step 3: 
Go to blogger Dashboard > Layout.
Add the HTML JavaScript Gadgat.
Impotent TIPS- Don't forget to add the widget on the Center place or where you want.
Paste below code in it and save 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;'/>
-------------------------------------------------------------
अब ब्रेकिंग न्युज लगाना ब्लॉगर पर à¤¬ोहोत ही आसान हे 

Post a Comment

0 Comments