Limiting the number of posts in labels page

Step 1. In Your (New Design) Blogger Dashboard Click The Drop Down Menu For Your Blog > Choose Template > Then Edit Html

Step 2. Find the following code in your blogs html - it will be in your template a few times :

(Click Ctrl and F for a search bar

expr:href='data:label.url'

Step 3. Replace them all with the following code :

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


Important - Highlighted is the number of posts displayed, it's set as 6.Replace the number 6 with the number of posts you want displayed.

Linking Directly To Labels

So that will set a number of posts to be displayed in the links automatically generated.By automatically generated i mean labels in a labels gadget in your sidebar or above/below your posts.What if you are adding manually adding labels links to a post, menu or elsewhere ?

Simply add ?max-results=6 to the end of the URL, changing 6 to the number you want.

So this :


http://www.yourawesomeblog.com/search/label/awesome
Becomes This

http://www.yourawesomeblog.com/search/label/awesome?max-results=6

That's it your labels pages now have a fixed number of posts displayed.

Drop Your Comments And Questions Below.

Share this

Related Posts

Previous
Next Post »

1 comments:

Write comments