Elegant Popular Posts Widget for Blogger Tweak

Dhiraj Barnwal Monday, 17 March 2014 43 comments
Popular Posts Blogger
Ever wanted a really elegant and beautiful popular posts widget for your blogger blog? If yes, then you have landed on the right place. Today I am back with yet another unique and amazingly looking popular posts widget customization.
I had my exams which ended just a couple of days before so I was thinking of something substantial to post. A image of this came to my mind and its here for all of you to use.

I have already posted quite a few Popular Posts customization posts. They are -

 So the widget I am going to add today looks quite different from the rest of the collection. You can see the demo of the customized Popular posts widget by clicking the button below.

Live Demo

Once you have seen the demo, to add the Popular posts customized widget follow the given steps.

Adding the Popular Posts Widget


Firstly go to  Blog Title → Layout → Add Widget → Popular Posts. Add the widget in the desired location and save the template.
Remember to check the Item Snippet and Image Thumbnail option.

Adding the CSS


Now we have to add the CSS of the Popular Posts customized widget, for this go to Blog Title → Template → Edit HTML. Press Ctrl + F and search for ]]></b:skin> in search box. After getting the code add the below given code just above ]]></b:skin>
/* Popular Posts Widget customized by AllBloggerTricks.com */
.PopularPosts .item-thumbnail { display: block; height: 190px; margin: 0; overflow: hidden; position: relative; width: 100%; }
.PopularPosts .item-title { position: relative; }
.PopularPosts img { display: block; height: auto; position: absolute; width:auto; transition: all 1s ease 0s; }
.item-title a { background:rgba(0, 0, 0, 0.35); color: #FFFFFF; font-family: Impact; font-size: 17px; font-weight: 100; padding: 10px 0; position: absolute; right: 0; text-align: center; top: 30px; width: 100%; }
.item-snippet { background:rgba(0, 0, 0, 0.35); color: #FFFFFF; font-weight: 900; left: 12%; padding: 10px; position: absolute; text-align: center; top: 95px; width: 70%; }
.item-content { position: relative; }

Also note that you have removed all the previous Popular Posts CSS codes (if any) before adding this one or the result will be the combination of the two.

Adding the JS


Usually Popular posts widget do not require any JavaScript, but this one needs in order to resize the popular posts image and cut short the snippet.
To add the JS, search for </body> and paste the below given code just above it.

<script src='//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'/>
<script type='text/javascript'>
 $(document).ready(function() {$(&#39;.PopularPosts img&#39;).attr(&#39;src&#39;, function(i, src) {return src.replace( &#39;s72-c&#39;, &#39;s400&#39; );});});
</script>
    <script type='text/javascript'>
    //<![CDATA[
    // Popular Posts customization by AllBloggerTricks.com
    // Trim Code by MS-potilas 2012
    $('.popular-posts ul li .item-snippet').each(function(){
     var txt=$(this).text().substr(0,120);
      var j=txt.lastIndexOf(' ');
      if(j>10)
         $(this).text(txt.substr(0,j).replace(/[?,!\.-:;]*$/,'...'));
    });
    //]]>
    </script>

After adding the code save the template. PS. Remove the code in red if you already have it in your template.

You are done now. Now you and your visitors can see this elegant Popular posts widget on your blogger blog. Also it is my earnest request to you that please do not remove the comments added in the codes. They will not be displayed in your blog. Only the person viewing the code can see this.
Labels:
Google+ Pinterest

43 Comments to Elegant Popular Posts Widget for Blogger Tweak Post Yours! Read Comment Policy ▼

hello will u share the popular post widget which are u using on this blog. above this comment

Nice tutorial and Thanks for sharing. Your site is ultimate blogging helper. <3

Bro I had a problem with my blog that Google is crawling.my Blog labels also, due to which it shows duplicate meta description error. Please suggest me any solution?

Regards:
Best Blogger Tricks 2014

This can be done by editing the Robot.txt file.. Google for more info, there are quite a lot tutorials which will help you.

I am planning to use this on my indian movie blog http://guruofmovie.blogspot.in/

Quite informative. Just wanted to drop you a quick note to say thank you for a great resource.

Blogger Bearned

thanks
http://www.newbloggerwidget.co.vu

Hello there,

I've been looking for a good-looking popular post widget for a while and I must say yours is the most good-looking one so far. I've applied it to my blog and I love the effect.

Thanks so much!

Nice widget, but it does't work for my blog. I want your help. My blog; Tiny Serval

Nice Tutorial.Keep sharing with us.

Hi amazing tutorial! Ended up with a great look - did a bit of editing myself as well :)

To take it a step further, was wondering if I can change the date range? So choose my own dates instead of just 7 days, 30 days or all time. There doesn't seem to be any instruction out there on how to do it.

Thanks!

Cool tutorial bro.. Thanks for share . Hope I will get benefited by this article Thanks a lot .

It does not work on my blog do i need to add an image at the start of every post to enable thumbnails

Great and really cool widget!!!

It doesnt work with google chrome browser

You should see that option under the Popular Posts widget itself

Hi it is already shared here- http://www.allbloggertricks.com/2013/04/popular-posts-v2-widget-customization.html

I love the look of this, but for some reason it is not working on my blog. I can get the standard blogger widget up but then none of the edits to change the look work. I followed the directions as written. Any ideas why it may not work?

This is the best popular post widget, but when we see this widget in mobile version of our website, then the title goes behind the image, please correct it and upload the complete correct code asap :)

I figured it out, but now I can't figure out how to get rid of the bullets or dots in front of each thumbnail. Any ideas anyone????

I was looking for this ..
Thank you

Is there a way we can customize your this one? Like change the font or color of the font?

Hello,

Thanks a billion for this tutorial it looks so elegant and crisp! Just what I was looking for :D
Now my problem is: I want the widget to be in my header area, so above my posts, but when I place it here the popular posts are still ABOVE one another. I want the pictures to be NEXT to eachother, how do I do this?

Thanks a lot,

Maria. www.phentastic.com

Hello again,

Here is the blog I'm working on: http://thesuckerforfashion.blogspot.dk/

I've customized the CSS a bit to make it look the way I want it.

/* Popular Posts Widget customized by AllBloggerTricks.com */
.PopularPosts .item-thumbnail { height: 190px; margin: 0; overflow: hidden; position: relative; width: 33%; }
.PopularPosts .item-title { position: relative; width: 33%; }
.PopularPosts img { display: block; height: auto; position: absolute; width: 300px; transition: all 1s ease 0s; }
.item-title a { background:rgba(0, 0, 0, 0.35); color: #FFFFFF; font-family: Impact; font-size: 17px; font-weight: 100; padding: 10px 0; position: absolute; right: 0; text-align: center; top: 30px; width: 100%; }
.item-snippet { background:rgba(0, 0, 0, 0.35); color: #FFFFFF; font-weight: 900; padding: 10px 0; position: absolute; text-align: center; top: 95px; width: 33%; }
.item-content:hover img {transform: rotate(10deg) scale(1.2); }
.item-content { position: relative; width: 100%; }

Now all I need to do is display the thumbnails along with their titles and descriptions NEXT to each other!
I've tried adding float and what not but nothing seems to work. Can you please help me out here?

Maria.

thanx this is very helpfull for me..
ibloggertraffic

hi i have a question
do we have any way to show more than 10?~^^

Nothing is change when i add widgets please help me

Is there a way to show the full image, just resized? For some reason it cuts off half my images :(

Thanks for this tip!! love learning more about blogger!
Take look at Blogger Tips and Tricks

Hi, I love the look of this gadget, but it looks like a mess on my blog! Can you see what I did wrong?

www.wanderlustandheart.ca

Nice tutorial and thanks for sharing. :)

Thank you so much. I added it on my blog

http://andromedaandme.blogspot.com/

i find for popular post code in blogger so i can put it anywhere, maybe you have a solution.. :|

The post snippet does not show properly over the image. How do I adjust that?
http://www.youmeandstories.in/


Arti Honrao

There are many popular posts widget, and one of them is like in this article. thanks for share.

Very nice Blogger Temple. It is SEO friendly and Mobile friendly. Your website contains best Blogger templates, Blogger widgets and Blogger Guide

wawww.. i must try this on my blog now.. thnks admin

thank you for sharing brother, goodjob

Snippets has already checked, but the not showing on popular post. how to fix this?

@Anto Ramana - excelive First You See In you template whether there is predefined styles for popular posts widget if you have then delete it. Then you add this widget by following the tutorial. If you are not familiar with blogger coding then we will help you.