Tuesday, March 17, 2009

Show only specific Number of posts in Labels Page - Blogger Hack

One of my Reader asked me in Comment Form " How to Show Specific Number of Posts in Labels Page ? " . So I am writing this Post on his request. This Hack ( Show Specific Number of Posts In Labels Page ) is very useful for Page Navigation Hack . Users who use my Page Navigation hack might have came across an error , that is When They visit Labels Page , Blogger will display all posts under that particular label although you might have mentioned in the page Navigation Widget to show only 2 , 3 or any number you specified there.


So here is an easy Hack to display only specific number of posts per page while visiting Labels. Just follow the simple steps below to implement this hack on your blogger blog.

Step 1 :

Users Who Have installed Labels Widget in their Blog , Please Navigate to EDIT HTML PAGE . Then put a check to Expand Widgets Box on Right Side.

Now search for this Code :

<b:widget id="Label1" locked="false" title="Labels" type="Label">

only the Widget Id can be different , other things will be same. Now search for this code within the widget
<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 the above code with this code .

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url &quot;?max-results=2&quot;'>
<data:label.name/>
<span dir='ltr'>(<data:label.count/>)</span>
</a>
</b:if>

The digit in red represents number of posts to be Shown in Single Labels Page.
Change the digit ( number ) in red to your wish .


Comments :

0 comments to “Show only specific Number of posts in Labels Page - Blogger Hack”


Post a Comment