How can I limit the results on the label pages?


#1

Hello guys, I’ve created my blogger’s template with Artisteer but now I need to limit the results on the label pages and I can’t. I haven’t found the code expr:href='data:label.url' to add the snippet + ?&max-results=7 and I think that the problem is my template. How can I do? Can you help me? Thanks!


#2

Please share your blog links and always add more explanation using screenshots to get an immediate response that may solve your problem


#3

Sorry, it’s difficult to me explain the problem because I’m italian and don’t speak english very well! I’ll try… I’ve add a numbered page navigation widget to my blog sofasophiablog.blogspot.it but it appears only in the home page and not in the label pages. The problem is that I can’t found the snippet of the label in the template code. I’ve a template created by Artisteer, a software, and the codes are different from the usual.


#4

I got your point.

The numbered navigation is programmed to work only on index pages that is your homepage and search pages. If you try to directly visit a label page, the numbered navigation will be replaced with default Next/Previous buttons unless the url contains the ?&max-results=5 parameter

To make sure the widget works on label pages also then make sure all your Label links must have this parameter;

?&max-results=5

Example:

http://www.mybloggertricks.com/search/label/Blogging%20tips?&max-results=5

In your template, the post body doesn’t display Label list. That is why you could not find expr:href='data:label.url'

If you wish to display labels below post and these label links must contain the above parameter also then add the following code just below <data:post.body/> inside your template.

Note: <data:post.body/> will appear twice inside your template. You may consider the second occurrence of it.

<b:if cond='data:post.labels'>
                                <b:loop values='data:post.labels' var='label'>
                                <a expr:href='data:label.url + ?&amp;max-results=7 ' rel='tag'>
                                  <data:label.name/>
                                </a>
                                <b:if cond='data:label.isLast != &quot;true&quot;'>
                                  ,
                                </b:if>
                              </b:loop>
                            </b:if>

Do this and let me know if you need more help :innocent:


#5

You are really nice to help me, thank you! Unfortunately when I paste the code below the second <data:post.body/> the main section of my blog disappears. :frowning: How can I fix this problem?


#6

it should work just fine because the code works just smoothly. Simple copy paste. Unfortunately that was the best help we could provide :innocent:

If you still think you can not do that then kindly request our premium support by clicking here.


#7

I’ll try again or I’ll decide to use the premium service. Thanks for helping me! :smile:


#10

In my template, <data:post.body/> is displaying 6 times. Where do I place the code?