Unwanted: Limited number of shown posts on tag.hbs

Hi everyone :wave:

At this moment, using my customised Casper theme, my tag.hbs based pages only show a limited (though large) number of posts. I would like it to show all published posts (with the standard infinite scroll for this theme, or even better, pagination).

Question: how / where can I adjust this number to unlimited / infinite posts…? :person_tipping_hand:

Thanks in advance,

Freek

A couple options, all requiring editing the theme (pretty much - I guess you could technically implement infinite scroll in code injection):

  1. Adjust the number of posts per page to something huge. That settings is in config.production.json in your theme’s root directory. Changes there affect everything, so you’ll also get lots of posts on your author page, index page, etc.

  2. Change tag.hbs. The #get helper can be told to get a different number of posts than specified in config.production.json, so you can use a #get to get a bunch of posts in tag.hbs. You’d put the #get helper right before the #foreach, and /get right after. Read the #get helper documentation to see how to change how many posts it gets. Ghost Handlebars Theme Helpers: get

  3. Implement infinite scrolling. Lots of options for how to do this. Some themes already implement it. If yours doesn’t, I’d look at a theme that does, or take a look at infinite-scroll, which is a vanilla or jQuery package. Note: I think the licensing is very reasonable, but it is not free. https://infinite-scroll.com/ . I’ve used that package with a Ghost theme. It’s a little fussy to get it working, but it works really well once you do.

1 Like

Thanks Cathy, I will check out your options soon…!