How to limit the number of posts displayed in label pages

Some of you maybe are annoyed by 20 max result when you are click your own label or tag of Blogger, and it makes your page of the blog very long to the bottom.In blogger you can limit the number of posts appearing on the home page, but you cannot to do it on the label pages.

In this post I will show you how to limit the number of posts showing in label pages.

Login To Blogger Go To > Design > Edit HTML.
(Back up your template)
and mark the tick box "Expand Widget Templates"

Then, find (CTRL+F) this code in the template.
expr:href='data:label.url'
You may find more than one instance. Replace them with the following
expr:href='data:label.url + "?max-results=5"'

For Label Cloud users.
To change the number of posts displayed when readers click on an item in your label cloud, find this line in your template:
a.href = lcBlogURL+'/search/label/'+encodeURIComponent(t);
And replace it with this instead:
a.href = lcBlogURL+'/search/label/'+encodeURIComponent(t) +'?max-results=5';
The '5' in the code above means that a page will show 5 post per (on each) page. You may change to any ammount you want. But we recommend to make the ammount same as how many the first page of your Blog show the post. And lower is better.

Now save it and see the result.

7 comments so far:

Zaki said...

Thank You :) I were looking for this. heading to my blog to fix'em :D

Chantha said...

your r just great. it helped me a lot

John said...

I would like to thank you for your useful work. This would be great help for all bloggers.

Rebecca said...

thanks so much, this worked for me very well. very useful info. thanks again

Unknown said...

thank you very very much.

i visited many blogs and site but for the first time i was very much impressed by your post it is very useful for me too.

it helped in my blog http://sjplmusic.blogspot.com

thank you once again.

abhilash said...

THANK A LOT FOR THIS INFORMATIVE AND USEFUL ARTICLE
PLZ GIVE A LOOK ON USEME4INFO.COM

Lok Bahadur Thapa said...

thank you very much for this tips...it is really helpful :)

Post a Comment

 
Royal Tutor © 2011 | Privacy Policy | Powered by Blogger | Back to top