crunchys_headerphoto




How to limit the number of posts on clicking a category or label

Whenever you click on the label(or Category in my case) link on Blogger's default templates, it will display 20 posts. It may be a good idea to limit the number of post displayed if your posts are all lengthy and contains alot of images. Here's how you do it.

From your Blogger dashboard, goto Layout>Edit HTML. To see all codes tick 'Expand Widget Templates'.

tick expand

Next, find the code data:label.url and replace it with data:label.url + "?max-results=n". Replace n with the number of posts you want to limit. For example, if you want the label link to display 6 posts at a time, the code should be data:label.url + "?max-results=6".

You may need to do this in two or more places depending on the template that you're using for your blog.

No comments:

Post a Comment