But many Bloggers want to show only specific number of posts on their labels page like 2 or 3 or 4 etc.
Here is a step-by-step guide on how to show only specific number of posts on the labels page in Blogger -
STEP I - First of all install a labels widget on your blog if you haven't installed it yet.(It's available in the "Add Page Element" menu.)
STEP II - Goto - Layout > Edit HTML > Expand Widget Templates.
STEP III - Find this code -
<b:widget id='Label1' locked='false' title='Labels' type='Label'>The number in red may be other like 2,3 etc. depending upon how many labels widget you have.
STEP IV - Below this widget code,find this -
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>STEP V - Now replace the above code with this code -
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url + "?max-results=2"'>The digit in red denotes the number of posts that are to be shown on the labels page,you can enter number of your choice.
<data:label.name/>
<span dir='ltr'>(<data:label.count/>)</span>
</a>
</b:if>
Now Save the Template.
That's it you have successfully added the Blogger hack for showing only specific number of posts in Labels page for Blogger.
No comments:
Post a Comment