Show Recent Posts With Thumbnails For Particular Label or Category in Blogger
Sometimes we want to have everything organized, so that our readers can find topics of interest more easily. To accomplish this, instead of putting a widget with the latest posts, we can put together the latest entries sorted by category, so that we'll be able to show the latest posts for each label we want and also display a thumbnail for our category.
To add this recent posts widget for labels or categories in a Blogger blog, follow the next steps:
Recent Posts with Thumbnails Sorted by Labels
Step 1. From your Blogger Dashboard, go to 'Template' and click the 'Edit HTML' buttonStep 2. Click anywhere inside the code area and search (CTRL + F) for this piece of code:
]]>
Just above ]]>, paste this CSS style:
/* Recent posts by labelsStep 3. Now try to find this tag:
--------------------------------- */
img.label_thumb{
float:left;
margin-right:10px !important;
height:65px; /* Thumbnail height */
width:65px; /* Thumbnail width */
border: 1px solid #fff;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}
#label_with_thumbs {
float: left;
width: 100%;
min-height: 70px;
margin: 0px 10px 2px 0px;
padding: 0;
}
ul#label_with_thumbs li {
padding:8px 0;
min-height:65px;
margin-bottom:0px;
border-bottom: 1px dotted #999999;
}
#label_with_thumbs li{
list-style: none ;
padding-left:0px !important;
}
#label_with_thumbs a { text-transform: uppercase;}
#label_with_thumbs strong {padding-left:0px; }
... just above add this script:
Note: to add your own pic for the posts with no thumbnail, replace the image url in blue with your own
Update! For a better image resolution add this script above the
0 commentaires:
Enregistrer un commentaire
Abonnement Publier les commentaires [Atom]
<< Accueil