Posts and site content

Choose which posts a list shows

A list of posts, the Collection block, can show your latest posts, the posts you marked as featured in Ghost, posts related to the one a reader is on, or any set of posts a Ghost filter describes. You choose this with Show in the list's settings.

Pick the posts

  1. Open your project in Fantasma.
  2. In the left sidebar, under Templates, click the template with the list, such as Homepage.
  3. On the canvas, click the list until the whole Collection has a blue outline, or click its row in the Sections list, the one with the circling arrows icon. In the right sidebar, its name is followed by Collection.
  4. Under General, select an option in Show. It appears when Source is Posts.

Show

The list shows

Latest

Your newest posts. The default for a new list.

Featured

Only posts with Feature this post turned on in their settings in Ghost Admin.

Related

Posts that share the primary tag or the primary author of the post the reader is on.

Filter

The posts a Ghost filter you type describes, such as all posts with one tag.

Page posts

The posts Ghost gives the page itself. That is all posts on the home page, the tag's posts on a tag page, and the author's posts on an author page.

The canvas shows the result with sample posts, so a tag only your site has finds nothing there. The sample posts use tags such as lifestyle, travel and wellness. To try your own tags, preview with your Ghost content. Your site shows your own posts after you publish the theme.

If Show is missing, the list is part of a section from a pattern, and only Limit can change there. Select the section and click Detach at the top of the right sidebar to change the rest.

Show posts with a tag

  1. In Show, select Filter. A Filter field appears.
  2. In the filter editor, add a tag rule for travel, or select Manual and enter tag:travel. The canvas shows only the posts that match.
The Homepage with the Latest Posts list set to Show Filter and the filter tag:travel, and the list on the canvas showing three travel posts

A filter names tags and authors by their slug, the short name in their URL, which you find in Ghost Admin under Tags or Staff. Some filters you can copy:

Filter Shows
tag:travel Posts with the tag whose slug is travel
tag:[travel,food] Posts with either tag
tag:-travel Posts without that tag
author:sarah Posts by the author whose slug is sarah
featured:true+tag:news Featured posts that also have the news tag
tag:hash-hidden Posts with the internal tag #hidden. An internal tag's slug starts with hash-

A + joins two conditions that must both be true, and a , joins two of which either is enough. Filters that use advanced Ghost syntax stay in Manual mode. The canvas shows sample posts for those filters, so check their results in Ghost. The full syntax is in Ghost's filter documentation.

Related is meant for the Post template, where the default Related Posts section at the bottom already uses it. It never lists the post the reader is on. On a template without a post, such as the Homepage, the list shows its Fallback.

  1. In Show, select Related.
  2. In Related by, select Primary tag or Primary author. The primary tag is the first tag on a post in Ghost Admin, and the primary author is the first author.
  3. In Fallback, choose what happens when no other post shares that tag or author. Latest posts shows your newest posts instead. Hide section shows nothing in place of the posts.

Hide section hides the whole section, including its heading and other blocks.

Set the order and the number

  • Sort orders the posts: Newest, Oldest, Title (A-Z) or Title (Z-A). It shows for Latest, Featured and Filter. Related and Page posts keep newest first.
  • Limit is how many posts the list shows, from 1 to 100, and 6 by default.
  • With Page posts, Limit is empty at first. Empty shows every post Ghost gives the page, which is as many as Posts per page in Project settings › Features. To show every post again after you enter a number, clear the field. Split post lists into pages explains how readers reach the rest.

Skip the first posts

Two lists with the same Show repeat the same posts. To let a large card show the newest post and a grid show the next ones, give the grid a start point:

  1. Select the first list.
  2. In Limit, enter 1.
  3. Select the second list.
  4. Click + next to General and select Start at.
  5. Enter 2. The list starts with the second post.

Start at goes from 1 to 100, works with every Show, and Limit counts from there.

Next, show your tags or authors the same way.

Was this article helpful?