Since I started posting before with no image, some of my popular post does not create thumbnails. As a result, there are posts on the list that tends to be out of place with the others.

So to resolve this, I have added a default image on the popular post list in case there is no thumbnail for the post.





To add the popular post (in case you haven't added it yet):

1) Go to the "Design > Page Elements" Page and add the "Popular Posts Gadget"


2) Edit the Gadget Settings so that it displays the 'Thumbnails'


3) Now go to "Edit HTML" and click "Expand Widget Templates". Prior to this make sure that you back up your template first in case of any trouble then look for this code:
Note that the 'title' might be different in your case.

<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>

4) Now scroll down and look for this part:

<!-- (3) Show only thumbnails -->
<div class='item-thumbnail-only'>
  <b:if cond='data:post.thumbnail'>
 <div class='item-thumbnail'>
   <a expr:href='data:post.href' target='_blank'>
  <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
   </a>
 </div>

5) Just below the code on number 4, add this:

<b:else/>
 <div class='item-thumbnail'>
  <a expr:href='data:post.href' target='_blank'>
   <img alt='' border='0' expr:height='data:thumbnailSize' expr:width='data:thumbnailSize' src='http://4.bp.blogspot.com/-0gh4uDq4vWM/TyC7Cl9Hs4I/AAAAAAAABK4/JKFA0kYiLXQ/s200/default.png'/>
  </a>
 </div>

6) Finally, save your template and enjoy! :)

Cheers!

7 comments :

  1. sana meron ding ganito sa wordpress :)

    ReplyDelete
  2. if you are looking for the popular post, meron naman siguro widget for that :)

    kung yung resizing, kaunting tweaking lang yan sa CSS then ok na :)

    ReplyDelete
  3. this I have to do with my blogger blogs, oo nga what about WP blogs? 

    thanks for the share!

    ReplyDelete
  4. Hi Ajibanda it does look nice on your blog it is Facebook recommend post widget.

    ReplyDelete
  5. thanks Yuuki! :)

    I'm not sure how it works on WP blogs but I would be glad to help you if you want :)

    ReplyDelete
  6. Hello Sir Aj Banda :D Ayos po ito! Thanks sa pag share ng information na ito! malaki po maitutulong nito ^_^v

    ReplyDelete