To show specific number of posts in label pages

Wednesday, December 23, 2009


When you click on any label in your blog the page displays 20 posts by default. If you want to change the number of posts to be displayed based on your template here is a hack.

To add this to your blog just follow these steps
  • Login to Blogger
  • Go to > Layout > Edit HTML and select 'Expand Widget Templates'
  • Now find(CTRL + F) this code :
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>
  • Now replace this code with below code.
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url &quot;?max-results=5&quot;'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>

 Change the value of code in red to your required value. This works well for any template.
 If you are using 'Label Cloud' don't use this.

Subscribe to our blog

Do you have any Suggestions, add your comment. Please don't Spam!
If you like this site >> Subscribe to our feed

2 comments:

Anonymous said...

it doesnt work for label cloud

Unknown October 25, 2012 at 10:44 PM said...

Learn how exactly do this easily.

Post a Comment