Set The Number Of Posts Shown On Labels Pages For Blogger




| 71 comments

number-posts-per-label-bloggerIn a recent post i showed you how to have your blogs labels displayed in a drop down menu.A comment from APF in that post remarked "I'd prefer to see a drop-down that honors the limit (in my case, 1) number of posts per screen I've set for blogger in general".What APF is referring to here is he has set his blog to display one post per page, so on the home page of his blog there will be only one post.Then the Older Posts, Newer Posts links are there for people to navigate through other posts.You can set the number of posts per page on your blog in your settings under formatting.This works fine on the home page and with the older, newer links but when someone clicks a label the limit is not applied, in this post i will show you how to fix that.

So APF wants only 1 post to be shown when someone selects a label, by default all posts will be shown.This is a bit of a mess, you can end up with 20 full posts loading or even crashing if you have large posts with no jump break.On Spice Up Your Blog i have 12 posts per page and i want the same on my labels page here is how it's done.

Take a look at the default link for the label Gadgets here on SUYB, if you click it you will get a big list of posts with that label  :

http://www.spiceupyourblog.com/search/label/Gadgets

Now in this link i have set it for only 2 posts to be shown with the older, newer links to see more :

http://www.spiceupyourblog.com/search/label/Gadgets?max-results=2

The actual number i have applied is 12, the same as the home page  which you will see every time you select a label.So lets see how you can set a limit to any number of posts you choose.

Set Fixed Amount Of Posts Displayed On Labels Pages


Step 1. In Your (New Design) Blogger Dashboard Click The Drop Down Menu For Your Blog > Choose Template > Then Edit Html > Now Proceed > Tick The Expand Widget Templates Box as shown in the video Below :

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 to help find the code - More Info)

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.


Join over 5000 Subscribers! Please sign up to receive Updates.

SUYB has its Focus on Quality. If we post Crap, you can unsubscribe.

No Spam and No Garbage! - Use RSS, Twitter & Facebook as an Alternative


If You Enjoyed This Post Please Take 5 Seconds To Share It.

71 comments:

  1. Yes yes yes finally found how to do it ! thanks soooooo much...

    ReplyDelete
  2. hi i can't find (expr:href='data:label.url') this in my blog i ticked expand widget but i can not find it please help

    ReplyDelete
  3. Thank you, I would like to ask how we can reduce the number of posts when turn on the Blog Archive.

    ReplyDelete
  4. @ Suprim - I checked out your blog and you have this already set at max as 7.So either you found it or it was already set in the template.

    ReplyDelete
  5. hi paul in my template i hav two code like this
    expr:href='data:label.url'
    and it's not workin please check my blog and give me idea how to show on my blog

    ReplyDelete
  6. dude now it's workin in my blog
    http://smahkin.blogspot.com/search/label/GAMES?max-results=6

    ReplyDelete
  7. @ Suprim I can't seem to find expr:href='data:label.url' in my blog. I've searched through it manually and also with the "Find" control.
    http://links4pk.blogspot.com/

    ReplyDelete
  8. @ Usman - What is the URL of the blog, just add the URL don't make it a link.

    ReplyDelete
  9. sorry for bad english:

    Dear i don't know what is the difference between url and link.
    and i have one more problem my blog width is increase due to blogger maintenance few days before. please you visit my blog and give me suggestion for how can i fix this problem..

    Screenshot:
    http://img12.imageshack.us/img12/9163/capturelkm.png

    ReplyDelete
  10. I Like Your Blog Very Much:)
    When Ever I Search On Google For Any Kind of Blogger Help
    I Choose Your Blog :)

    ReplyDelete
  11. Great, thank goodness I can limit the number of post in my label.

    But I have another problem; I use a custom template and I limited the number of post to be displayed in my blog to 5. It actualy worked, but only on the forst page, when you click next to the second page, it would display 10 post and surprisingly, because I limited to 5 post, the number 6, 7, 8, 9 & 10 post that should have been displayed on the first page wont appear on the second page.
    Based on this, I limited it to 10 post per page so as to show all my post, but doing so resulted in a longer loading time. Please, Please, Please help me out, is there a place in the "edit template" I can do this.

    Please help.

    ReplyDelete
  12. i have experiment in my blog,succeessfully..Thanks Mr

    ReplyDelete
  13. thanks for the tips :)
    nice post ;)

    ReplyDelete
  14. It doesn't work.. My template is Picture window.. Please Help me!!! :(

    ReplyDelete
  15. Thanks for the info...but how can I edit the size of image in the result page of labels?

    ReplyDelete
  16. Thanks for sharing, was looking for this

    ReplyDelete
  17. thank you so so much. It works like a charm.

    ReplyDelete
  18. Thanks for sharing..
    I want to try it..

    ReplyDelete
  19. On the label, it does appear "http://angiesrecipes.blogspot.com/search/label/Nuts%20and%20Seeds?max-results=12", but it just shows 11...and I clicked the older pages...another 11...
    What could be the problem?

    ReplyDelete
  20. p.s on "formating", I did set up 12 posts on the main page.

    ReplyDelete
  21. Hi
    please i need your help , i want to change posts number on my second page , at home page i have 10 posts apear but in second page just 4 i want 10 , plez help
    Thank's

    ReplyDelete
  22. finally a great fix.....!!!

    ReplyDelete
  23. Are there any valid alternatives for the new Blogger interface..? Thanks!

    ReplyDelete
  24. Please help me my blog is showing 1 or 2 posts on the main page i have 6 posts total where are the other posts. I want to show 10 posts on the main page i have set it in the posts options but still not showing my blog url is http://wicket99.blogspot.com

    ReplyDelete
  25. Its not used in my blog
    is there any restrictions for this trick
    like it can be only usedin blogeer templates

    ReplyDelete
  26. I did this successfully on my website. What about?max-results=5" appearing on search results? Will that affect SEO?

    ReplyDelete
  27. good posting...thanks for sharing

    ReplyDelete
  28. Thanx Paul, You are the master of blogger. It's working great.

    ReplyDelete
  29. this is broken for my blog, its working on main the page but on category its still shows the "older post" navigation and when i click on that, thats the time this page number shows up

    ReplyDelete
  30. Your tutorial worked great. Thank you so much!!

    ReplyDelete
  31. It's not work for my blogger homepage, but it worked from next page. This is my blogger website : http://earningononline.blogspot.com/ Please tell me how can I solve my problem?

    ReplyDelete
  32. my blog address appears like this

    http://winmaclin-wallpaper.blogspot.in/search?updated-max=2012-07-15T02:04:00%2B05:30&max-results=50

    my post are not being displayed only 5 newer posts are displayed on home page plz help me out here... thanks in advanced plz do reply soon i m stucked...

    ReplyDelete
    Replies
    1. ur problem solve or not ?
      Because i have save problem

      Delete
    2. I have the same problem!
      What should I do? Please help!

      Delete
    3. I have the same problem!
      What should I do? Please help!

      Delete
  33. Ouwwh yes! :D after so long time xD finally I found it here :D thanks for share :D

    ReplyDelete
  34. yyyess it is working in my picture window template
    thanks

    ReplyDelete
  35. Thanks, this is work :)
    I wonder why trivial things like this go unpunished by the fact blogspot blogger under google support.

    ReplyDelete
  36. Actually I Already Know About This. I Want To Know How To Apply This Feature To Search Result In Blogger To Make Blog More Professional :)

    ReplyDelete
  37. problemo solve. thanks for sharing

    ReplyDelete
  38. Thanx a lot Paul. It rele worked on my blog. Keep going.

    www.entertainmentinfo.in

    ReplyDelete
  39. How do I make my blogger show all my posts on one page?

    ReplyDelete
  40. Hi! I want 10 posts to show on my homepage, but only 5 show. I did exactly what you said. But it's not working. I also tried to configure my blog using Settings, but it's still not working. Maybe it's automatically configured, but I don't know how to determine that. Do you know how to fix this problem? Thanks for your time.

    ReplyDelete
  41. Thanks Admin,You Really Helped Me(y)

    ReplyDelete
  42. I find expr:href='data:label.url but I got error when added + "?max-results=6"'.

    What should I do?

    ps. I have 5 posts in a ... label and I want to show 4 posts per page.

    ReplyDelete
  43. thanks one more time as i have already thanked you for making my blog wonderful by default no of posts were 7 in my blog and now i have been able to set it upto 10 from your tips.Thank you for great blogger help.

    ReplyDelete
  44. well i find 6 results of this and when i change all of them nothing happens.
    ps. i dont know what is going on . some labels have (link)
    max-results=20&start=16&by-date=false
    others
    max-results=20&start=12&by-date=false

    can you help me?

    ReplyDelete
  45. does this work automatically somehow? It makes no sense to edit the template. No effect. Only when I made the custom links it worked. Any way to make this work with the default labels?

    ReplyDelete
  46. it couldn't work for me .. i want to all of all posts in label, how it is possible please help ...

    ReplyDelete
  47. I can't seem to find the expr:href='data:label.url' thingy on my blog www.trynottolaughorgrin.com please help!!!

    ReplyDelete
  48. The Blog you are running is just awesome. The stuff and theme of the blog is so impressive. The actual match, like your blog, is found on very rare places. This blog is so clear and simple, there is no useless content you have added just to show a fake knowledge about the topic. I am new to blogging and picking lot from your blog. Here is my blog if you want to take a look and do suggest me if any problem or something missing.
    Thanks a lot!!!

    http://www.applicationf1.com

    ReplyDelete
  49. Yep.... it is working bro..
    Thank you very much for sharing...

    ReplyDelete
  50. Finally I got the result. Thank you so much.

    ReplyDelete
  51. I applied it to my blog and it worked.Thanks for such type of post. keep it up.

    ReplyDelete
  52. tutor tested 100% work.... thanks...

    ReplyDelete
  53. thank you very much

    ReplyDelete
  54. hi, my blog is www.ehowto.in. i am able to set 9 blog on home page only. please tell me how to set 20 blog on home page. thanks

    ReplyDelete
  55. "GOD" Bless
    Thank a lot

    ReplyDelete



Important - If you ask a question make sure you tick the "Notify Me" box below the comment form to be notified of follow up comments and replies.


Hire Us