LATEST POSTS

May 31, 2010

Edit/Customise Number Of Posts Displayed In Blogger Label Search

Clicking on an Individual Label category generally displays all/most of your posts (under that particular category on a single page. This has the following disadvantages

1. When the number of posts under a particular category is large, the single page becomes so long that it becomes a hinderance to easy reading.
2. It makes your blog look ugly.
3. It reduces the number of your page-loads. This often translates into reduction of your advertisement revenue.


The way out is a simple html hack that will allow you to display only a specific number of posts per page following a lable click/search.

Thus to display only a specific number of posts per page follow the following steps

1. You should have label widget installed in your blog to proceed further.
2. Now go to Dashboard > Layout > Page Elements > Edit Html Page > Expand Widgets
3. Now search for the HTML code displayed below

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>

4. Next replace the above code with the following:-

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url + &quot;?max-results=2&quot;'>

Note: The digit 2 in RED above shows the exact number of posts to be displayed per page.


Thus If you implement the code above, you will be showing 2 posts per page upon a label click/search. You can change this as per your requirement.

Share this:

 
Copyright © 2017 INKJAM. Designed by OddThemes | Distributed By Gooyaabi Templates