Limiting the number of posts in labels page on Blogger

If you have lots of posts it helps if you can limit the number of posts appearing in a page. It will page load time and requires less scrolling by your readers. In Blogger, you can limit the number of posts appearing on the home page, but you cannot do so on the labels page.
reduce the 
In this short tutorial I will show you how to put a limit to the number of posts appearing in labels page.


1. Changing the code for in-post and Labels gadget labels.

  1. Login to your Blogger account.
  2. Go to Dashboard > Design > Edit HTML.
  3. Back up your template.
  4. Tick the  Expand Widget Templates check box on top right of the HTML window.
  5. Look for following line in your HTML code:
    
expr:href='data:label.url'

You may find more than one instances. Replace them with the following:


expr:href='data:label.url + "?max-results=5"'

The codes above limits the list to 5 posts. (You change the number with your own limit).
Once the code is altered, your label pages will only show 5 posts. To view the next set of 5 posts, just click the Older Posts link at the bottom of the page.

No comments:

Post a Comment