Friday, April 3, 2009

How Show Specific Number of Posts In Blogger Label Pages

How To Show The Specific Number of Posts In Blogger Label Pages,ya whenever you click on any lablel page of your blog it shows mostly all of your posts in that single page, sometimes that page length becomes so long that it becomes problem for your visitors or readers.And some want to be shown specific no of posts according to there template designs like i want to show only one post in label pages in my photo blog so that it can work just as next previuos on all pages.So this hack is very useful for some of the fellow bloggers.

Now how to implement this :-

You should have label widget installed in your blog to proceed further.

Now go to Dashboard > Layout > Page Elements > Edit Html Page > Expand Widgets

Now search for below code within the html,


<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>


And replace the above codes with below:-


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



The digit 2 in red in above code tell how many posts you want to show in label pages.So change it to any number as how much posts you want to see in your label pages.And if you have many posts in label pages and want to show all then use this hack how to show only post titles in label pages.It will be very helpful for you.

That's it We have successfully added " Show Specific Number of Posts in Labels Page " . here after your Blog Will Show only specific number of posts in Labels Page. I hope This Hack will be useful for you all. If you have any doubts or difficulties in implementing this Hack please let me know in comments.

No comments:

Post a Comment