Forum

Thread tagged as: Question, Discussion, Blog

How do I set a count limit on the the amount of blog tag links that I'm displayi...

Hi,

I have the following code in the side-bar of my blog to show a list of tags that have been added to all posts.

<?php perch_blog_tags(); ?>

I'd like to restrict the amount that are shown initially to say 10 and then underneath have a 'load more' button which would add more onto the initial 10 tags.

Could anyone give an example of how would I could do this?

Thanks!

David Springate

David Springate 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can pass in an options array:

perch_blog_tags(array(
    'count' => 10
));

That's what I thought but I've put in the following and its still just showing all of the tags available more than 10

<?php perch_blog_tags(array(
    'count' => 10
)); ?>

Any ideas what I might be doing wrong?

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, that looks correct to me.