Skip to main content

label pagination in blogger

Mohamed Rias is a very clever guy. I was, as so many, struggling to find a solution to the label pagination problem in blogger. Turns out that you simply can add the number of posts to display to the url, very clever indeed.

Open the HTML editor and expand the widgets (as usual save your template first).
Find the label widget.


<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'>
<data:label.name/>
</span>
<b:else/>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url + &quot;?max-results=7&quot;'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>
</li>
</b:loop>
</ul>

<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>>


The changes are marked in red.
'max-results' can be any number you like.

Comments

Marianna said…
You saved me! Was looking around and couldn't find a solution. Thank you xD
Unknown said…
Hello it work like a charm in my blog. Thanks for the guide.

http://bloggertemplatescloud.blogspot.com/