How to Limit the Number of Posts shown in Label Page in Blogger | Share To World

Wednesday, October 1, 2014

How to Limit the Number of Posts shown in Label Page in Blogger

  admin       Wednesday, October 1, 2014
Depending on the number posts, your Label list will grow. Ad you are at liberty to put as many Labels as you can think of for a particular post. If you have been labeling your blog posts correctly with few labels, than it's not a problem as long as the number of posts are not very high. But if you start writing more and more articles, your label lists will grow and grow and ultimately fill up your side bar. If you have been following the golden rule of labeling, your blog post under two categories that is Major and Minor categories, than you are well off and probably know already what this post is all about, but even than, if you are using labels as tabs either on the navigation bar or in the side bar, and if you click on that particular label, all the post under that particular label will be shown. Suppose you have 30 or 40 posts under that label, imagine how long it will take to load all those pages? that is something no blogger not even you want that. Let's start to go to be way to limit the number posts to be shown under a Label Page.

1- Go to your Blogger Dashboard

2- Go to Template  >>  Edit HTML (Please back up your existing template to be safe)

3- In the HTML code box, press Ctrl+F then type:
4- Depending on your Template you may find this code in more than one instance. Replace them with the following code:
expr:href='data:label.url + "?max-results=6"'

If you are using Menu Tabs which links to your Label pages, than the label links you are using probably looks like this:
To limit the number posts shown under a particular Label, we just need to add the following code to the link:
So your label link should be like this:
http://YOUR BLOG LABEL NAME?max-results=6

The max-result=6 means to show only 6 post at a time under the particular label link. You can change  it to any number you wish to show.

5- Save template

That's it!
Don't forget to share this awesome tip to your friends by clicking sharing buttons below.


Thanks for reading How to Limit the Number of Posts shown in Label Page in Blogger

« Prev Post

No comments:

Post a Comment