When blogger released Popular Posts widget back in 2011, we leaked out its stylesheet so that you can customize it to blend it perfectly to your BlogSpot templates. Today we will learn how to display the list of popular posts using CSS3 auto increment property. You can style the numbers in variety of shapes, we styled them in square/rectangular and circular shape. you guys were the first to display threaded comments with Comment Counts and today you will again learn something more interesting. You can see a practical demo of this implementation on our sidebar. Lets add this effect to blogger in fairly easy steps using pure styles with no use of JavaScript.
Popular posts widget is an effective tool to increase your blog pageviews and engage readers more on your blog. It fetches and ranks posts based on most visited pages using your Google analytics data.
Add Popular Posts Widget
- Go to Blogger > Layout
- Click "Add a Gadget"
- Choose "Popular Posts" from the list
- You will need to configure its settings as shown in the image below: uncheck "image thumbnail" and also "snippet" Its better that you display at most 7-9 posts. Less is good and clean.
5. Save it
Customize Popular Posts Plugin
Now you need to change the default styles and change its look to our desired design using Custom styles.
- Go To Blogger > Template
- Backup your Template
- Click Edit HTML
- Search for </b:skin>. Click the black arrow to expand the code.
5. Paste the following Styles just above </b:skin>
/*--- MBT Popular Posts --- */
.popular-posts ul {
padding-left: 0px;
counter-reset: popcount;
}.popular-posts ul li:before {
list-style-type: none;
margin-right: 15px;
padding: 0.3em 0.6em;
counter-increment: popcount;
content: counter(popcount);
font-size: 16px;
background: #292D30;
color: #ffffff;
position: relative;
font-weight: bold;
font-family: georgia;
float: left;
border: 2px solid #dddddd;
box-shadow: 1px 2px 9px #666666; }.popular-posts ul li {
border-bottom: 1px dashed #dddddd;
}.popular-posts ul li:hover {
border-bottom: 1px dashed #696969;
}.popular-posts ul li a {
text-decoration:none; color:#5A5F63;
}
.popular-posts ul li a:hover {
text-decoration:none;
}
Customization:
- To change the background color of the Square bubble edit #292D30
- To change the text color of the bubble edit #ffffff
- By default the shape of the bubble is Square. To change it to Circle simply add the following code just after box-shadow: 1px 2px 9px #666666;
border-radius:15px;
6. Save your template and you are all done!
Visit your blog to see it working just perfectly.
If you would wish to add it inside a Multi Tab Widget just like we have done on our blog, then you can find several tutorials on our blog that were released years ago on Multi Tabs. Please read one below:
Need Help?
I just hope you would find this tutorial easy and yet exciting. Please let me know if you need any help. I just hope you continue adding more colors and flavors to your beautiful blogs. Wish you success and peace buddies. :)