Unknown Unknown Author
Title: Add New Breaking News Widget for Blogger
Author: Unknown
Rating 5 of 5 Des:
Hello to you again in the new topic, and exclusive of the blog newth3, today, we will add a new tool and easy, this tool you view the l...

Hello to you again in the new topic, and exclusive of the blog newth3, today, we will add a new tool and easy, this tool you view the latest news blog in the form of a horizontal to suit the templates blogger. I hope you like it

how to Add New "Breaking News"





Written explanation 
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 → Layout → Page 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. 

Advertisement

Post a Comment

  1. hi,
    In my Blog it not showing any posts , just showing Loading only..

    ReplyDelete
  2. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. The play news

    ReplyDelete
  3. Your articles are inventive. I am looking forward to reading the plethora of articles that you have linked here. Thumbs up! website

    ReplyDelete
  4. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. chen zhi prince group

    ReplyDelete
  5. My friend mentioned to me your blog, so I thought I’d read it for myself. Very interesting insights, will be back for more! news in hindi

    ReplyDelete
  6. THIS WEBSITE PROVIDE LATEST cnn news ON TECHNOLOGY WORLD GADGETS AND MANY OTHER THINGS. KEEP SUPPORTING US FOR LATEST NEWS AND WE WILL PROVIDE BEST OF OUR TO MAKES YOU UPDATED ALL AROUND THE WORLD NEWS. Keep Sporting US.

    ReplyDelete
  7. Superior post, keep up with this exceptional work. It's nice to know that this topic is being also covered on this web site so cheers for taking the time to discuss this! Thanks again and again! Nabela Noor

    ReplyDelete
  8. Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks ofwakomagazine.com has announced

    ReplyDelete
  9. Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging.. JAMB News

    ReplyDelete
  10. I went to this website, and I believe that you have a plenty of excellent information, I have saved your site to my bookmarks. naija news

    ReplyDelete
  11. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. naija news

    ReplyDelete
  12. Business Resilience requires an new look at Disaster Recovery and Business Continuity that aligns the risk businesses face today due to Black Swan events with new strategies such as cloud technology.

    ReplyDelete
  13. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. EPL news

    ReplyDelete
  14. I read Post and got it fine and informative. Please share more like that...
    Softech Source

    ReplyDelete
  15. Got the best results for me which I was looking for almost a decade and believe me I am not disappointed a bit! Great Work! Five Stars! Recommended to everyone! Login Fendi188

    ReplyDelete
  16. Excellent to be visiting your blog again, it has been months for me. Rightly, this article that I've been served for therefore long. I want this article to finish my assignment within the faculty, and it has the same topic together with your article. Thanks for the ton of valuable help, nice share. Տարանցիկ վիզա Թուրքիայի համար

    ReplyDelete

 
Top