Labels, also known as categories of post on blogger. All the posts related to same category is given same label name. When you click on Label name in any blog you visit, you will be redirected to a page where you can see all the posts related to the label name/ category. But a single Label name can have hundreds of posts, so, it is necessary to manage the number of posts to display per Label page.
If you have set 6 posts to display in your blog page, but also you can see more than 6 posts in your label page. So, you need to set number of posts for label page as well. By default, the number of posts per page is 20, but it can be less if you have used lots of images and text in your post even if you set it higher value. Having large number of post per page takes more time to load and also the page loading speed of your site also might go down. To avoid this, you need to set the number posts to display per Label name.
To set the number of posts to display in a Blog Label Page, there is no direct feature or option provided by the Blogger. So, you need to do it manually by editing your blogger template. Follow these steps to edit your Template and Set the number of posts per label page:
- Open your Blogger Dashboard.
- Click on Theme.
- Click on Edit HTML.
- Click anywhere inside the code and press CTRL + F on your Keyboard.
- Enter the following code on the search box and press Enter Key:
expr:href='data:label.url' -
You will find a code something like this:
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'><data:label.name/></a> </b:if> <b:if cond='data:showFreqNumbers'> <span class='label-count' dir='ltr'>(<data:label.count/>)</span> - Replace it with the following code:
With:expr:href='data:label.url'expr:href='data:label.url + "?max-results=6"'
Replace 6 with the value you want to show number of posts per page.
- After that, click on Save template and check on your blog.
If it worked, congratulations, else check this faqs why it is not working:
- Make sure you have edited correctly as described above.
- Also, check if you have clicked Save template before refreshing your blog.
- If you can't find the codes, try to find it by splitting them. If you still can't find, make sure you have used Label widget in your blog.
- Make sure to use Label gadget on your blog. If you have not used, use it and follow the given instructions. Click here to see how to add Label widget in your blog.
- If you still have any problems in it, Contact Me.
Or, If you are using a custom blog page to show a list of the Labels/ categories of your posts, it will be a little bit easier to do this. There is no need of editing blogger template as well. If you are confused what I am talking about, Click here to see how to create custom Label/ Category page in Blogger.
After that, just follow this process:
Change the link of your Label from:
https://www.NameOfYourBlog.com/search/label/LabelName
To:
https://www.NameOfYourBlog.com/search/label/LabelName?max-results=6
Replace 6 with the value you want to show number of posts per page.
Now, you will have only that number of posts per page under label search that you have set and also limit number of post per label.