Showing posts with label blogger widget. Show all posts
Showing posts with label blogger widget. Show all posts

Monday, June 10, 2013

Add Total Posts & Comments Widget in Blogger



How to show total number of posts and comments widget in blogger blog


Hello Guys! Hope you all are fine. Today I have come with another post for bloggers! You know there are many tips and tricks published for bloggers. You will find them in the blogging category. And several times I have also discussed about adding attractive widgets in blogs. Today I'm gonna share another one with you- Total Posts & Comments Widget.


Adding this code is very easy. All you need is just to add an HTML/ JavaScript Gadget in your site. And before that you must decide where you will place this gadget. It maybe at the bottom, or maybe at the right pane (if any) of your site. Or if your site has any page views/  hit counter then you can place it just before that counter. 

Okay let's start: 
  1. Don't forget to sign in your blogger account. Then go to the blogger control panel I mean design or dashboard. 
  2. Go to the Layout option from the left side. 
  3. There you will find several Add a Gadget options. Select one that is suitable for you. 
  4. Find and select HTML/ JavaScript Gadget. (Usually found at the 11th position)
  5. Now copy and paste the code below in the Content box.
  6. Hit the Save button and rearrange the widget by dragging through by mouse if necessary. 
  7. That's it! View your site to check. 
<script style="text/javascript">function totalPosts(json) {document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');}function totalComments(json) {document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');}</script><script src=" /feeds/posts/default?alt=json-in-script&callback=totalPosts"></script><script src=" /feeds/comments/default?alt=json-in-script&callback=totalComments"></script>


And also look at the Demo below. This is exactly what you will get in your site after adding the above code in your template. 






Stay with Marks PC Solution to get more interesting IT topics!



Monday, November 5, 2012

Show your Recent Blog Posts as Headline !!








Recent posts widget can increase your page views to a great extent. When someone is on your blog and reading a topic he may find another topic useful from recent post list. So adding a recent posts widget is also important for attracting readers to stay long in your site. 

But there maybe many other widgets in your blog. And adding too much widget is boring and it also looks odd. 

Today I'm gonna share a code with you. This code will show your recent posts as headline! And certainly it will be space effective. It will take space just as a single line. All you need to do, is just add an HTML/ JavaScript gadget at the top of your site. 

  1. First, sign in to your blogger account and go to design.
  2. Then hit on layout button from the left pane.
  3. Click on Add a Gadget (Select gadget from top).
  4. Choose HTML/ JavaScript.
  5. Now copy and paste the following code into the content box.
  6. Now save the gadget and view your blog.

<script style="text/javascript" src="https://sites.google.com/site/munnamark/test/Recent%20Post%20Headline%20Widget.js?attredirects=0&d=1"> </script><script style="text/javascript"> var nMaxPosts = 7; var sBgColor; var nWidth; var nScrollDelay = 175; var sDirection="left"; var sOpenLinkLocation="S"; var sBulletChar="•"; </script> <script style="text/javascript" src="http://munnamark.blogspot.com/feeds/posts/default?alt=json-in-script&callback=RecentPostsScrollerv2"> </script><span style="font-size: 55%;" > <a target = "_blank" http://munnamark.blogspot.com/2012/11/show-your-recent-blog-posts-as-headline.html " >Get this Widget</a>


Remember, here I used my blog link. You must change the red part of the code with your blog name. And just change the red part. Nothing else.



Customization: You can also customize the code as below.


  • Max Posts = 7. That means how many posts will be shown. You can change this as 5, 6 or more.
  • Scroll Delay = 175. If you write 100, it will increase the speed. And if you wanna make it slower then use more than 175.
  • Direction = Left. That means your post will be moved from right to left. You can also use right. 


Stay with Marks PC Solution to get more interesting IT topics!