rss

Friday, January 28, 2011

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.

Subscribe to this Blog via Email:

Click here to Subscribe to FREE email updates from "Everything About Blogging", so that you do not miss out anything that can be valuable to you and your blog!!

Spread It : Share On Facebook ! Share On Google Buzz ! Add To Del.icio.us ! Share On Digg ! Share On Reddit ! Share On LinkedIn ! Post To Blogger ! Share On StumbleUpon ! Share On Friend Feed ! Share On MySpace ! Share On Yahoo Buzz ! Get These Share Buttons ! Share On Google Reader ! Google Bookmark ! Send An Email ! Blog Feed !


0 comments:


Post a Comment

 

Recent Posts

Followers

Recent Comments