Sticky posts widget using (recent posts by label) widget

Sticky posts widget using (recent posts by label) widget

Sticky posts widget


Blogger doesn't has sticky post option like the one that WordPress has so if you want to create sticky post you would put the posts manually in a HTML/JAVASCRIPT widget at the top of your content

Another way is to use the following code so you can add as many posts as you like from you admin panel , just give the post you would like to make sticky the label sticky and you are done !

1- Create a label and name it Sticky

2- Go to Layout Design > Page Elements Open a new HTML/JAVA-SCRIPT widget and add the following code

3- Move the widget to the top of  content area .

<!-- sticky posts by label --><script type="text/javascript">function recentpostslist(json) {document.write('<ul>');for (var i = 0; i < json.feed.entry.length; i++){for (var j = 0; j < json.feed.entry[i].link.length; j++) {if (json.feed.entry[i].link[j].rel == 'alternate') {break;}}var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bsvar entryTitle = json.feed.entry[i].title.$t;var item = "<li>" + "<a href="+ entryUrl + '">' + entryTitle + "</a> </li>";document.write(item);}document.write('</ul>');}</script><script src="http://Blogger4Blogger.com/feeds/posts/summary/-/sticky?max-results=5&alt=json-in-script&callback=recentpostslist"></script><span style="font-size: 80%; float:right;">Get this <a href="http://brought2you.blogspot.com/2012/03/list-recent-posts-by-label.html">widget</a></span><!-- Recent Posts by Label End --> 
4- Change the highlighted text to your blog URL and the highlighted No. to change the No. of posts as you like

5- Click save and Done

============================

Sticky posts widget


Another way to do the same thing is to use feed widget


Go to Layout Design > Page Elements Open a new HTML/JAVA-SCRIPT widget

add the following link which is just a normal label feed link

http://yourblog.blogspot.com/feeds/posts/default/-/sticky
Change yourblog.

Note that Labels are case sensitive so sticky is not like Sticky you should use the exact word you added to labels








Sticky posts widget using (recent posts by label) widget
4/ 5 stars - "Sticky posts widget using (recent posts by label) widget"