Phum-share

Last Updated:    Sunday, July 31, 2016

How to limit the Number of Posts Shown in Blogger Label Pages

In Blogger blog, if you click on any label, it will redirect to you that label page which contain all the post of that particular label. If you have lots of posts for a specific label, the label page slow your loading time and requires more scrolling by your users. So how we can get rid of that ? Yes the only solution is limiting your number of posts appearing on the labels page.




Step 1: Login to your Blogger account.
Go to Dashboard >> Design >> Edit HTML.

Step 2: Now find out ( press 'Ctrl' + F to open your browser's search box)


expr:href='data:label.url'


or look for this

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

Now you will find out less or more like this code as below:
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'> <data:label.name/> </a> </b:if> <span dir='ltr'>(<data:label.count/>)</span>

Step 3: Now replace the highlighted means

expr:href='data:label.url'
with
expr:href='data:label.url + "?max-results=7"'

or with (If upper thing not work)

expr:href='data:label.url + "?max-results=7"'

Changing the code for Custom Labels Menu Tabs

If you have use Label Link in your menu, it probably look like this:

http://YOURBLOGNAME.blogspot.com/search/label/YOURLABEL

to limit the number of posts shown, just add ?max-results=7 at end of the link like this:

http://YOURBLOGNAME.blogspot.com/search/label/YOURLABEL?max-results=7

Once you successfully altered the code, your label pages will limits the list to 7 posts. (You change the number with your own limit). To view the next set of 7 posts, just click the Older Posts link at the bottom of the page.

Share this

No comments:

If You Have Any Question Please Comment Back ..

HTML Code Encoder