1. Select some posts by adding a specific label on the chosen posts
2. Display the most recent published posts
2. Display the most recent published posts
Code to display posts of one specific label
You can choose some random posts and then add the label, or you can use an existing label and make the slider thematic. In this article, a label named featured will be used as an example but you can use any word you want.
Adding the "featured" label on published posts
- Go to Posts on the Blogger dashboard vertical menu.
- Locate the posts you want featuring and check the little box nearby their titles.
- Locate the label icon option on the menu above the posts list and click on it to open the dropdown.
- Click on New label...
- On Enter the new label field, write featured
- Click on OK.
Set the label on the slider code
<div class="gbml-slide">
<script src="/feeds/posts/default/-/featured?orderby=published&alt=json-in-script&callback=showgalleryposts&max-results=80"></script>
</div>
The blue text referring to the label added to the posts before.Replace it with your own label, if it's the case.
Important: Blogger labels are case sensitive. It means that featured, Featured, and FEATURED are three different labels. Make sure you are using the correct one.
Code to display the most recent posts
If you want to display your posts sorting by published order, this is the code for your slider:<div class="gbml-slide">
<script src="/feeds/posts/default/?orderby=published&alt=json-in-script&callback=showgalleryposts&max-results=80"></script>
</div>