Posts and site content

Split post lists into pages

Your home page, tag pages and author pages show a set number of posts per page. Readers reach older posts through Previous and Next links, which come from the Pagination block. The default Homepage, Collections, Tag and Author templates already have a post list set up for this and a Pagination block under it. Add your own only on a template you built or changed.

Before you start

Pagination works only with a post list whose Show is Page posts, on the Homepage, Collections, Tag or Author template. A list set to Latest, Featured, Related or Filter shows the same posts on every page, as many as its own Limit. To check, select the list, a Collection block, and look at Show in the right sidebar. Choose which posts a list shows explains it.

Set how many posts a page shows

  1. Open your project in Fantasma.
  2. Click the project name at the top of the right sidebar. Project settings opens.
  3. Click Features.
  4. In Posts per page, enter a number from 1 to 100. The default is 10.
  5. Press Enter or click outside the field. Fantasma saves it with your project.

Ghost Admin has no setting for this. The number goes into your theme file, and your site uses it after you publish the theme again. It applies to every list set to Page posts.

  1. In the left sidebar, under Templates, click the template with the list, such as Tag.
  2. In the Sections list in the left sidebar, point at the row of the section with the post list and click the + at its right end. The block picker opens.
  3. Under Content, click Pagination. It appears at the end of the section. If the list sits inside a group, drag the Pagination row in the Sections list to just under the list's row.
  4. Optional. In Previous Label and Next Label, change the words, such as Older posts. The defaults are "← Previous" and "Next →". On the default Homepage, Next Label reads "See all →".
  5. Optional. In Variant, at the top of the block's settings, click With counter to show "Page 2 of 5" between the links. Default shows the links alone.

The links show only when there is more than one page.

Design page 2 and later of the home page

Ghost uses the Homepage template only for the first page of your home page. Page 2 and later use the Collections template. To keep the pages alike, give the Collections template the same post list and Pagination block. Tag and author pages keep their own template on every page.

Was this article helpful?