Since I’m a WordPress Guy I am used to things like using Pages for different types of Posts (Maybe a customer wants to separate blog posts from works he has dome and so on). Anyway, I wanted to check out Ghost since WordPress isn’t very fast anymore, so Ghost looked like an alternative to WordPress, especially for smaller projects.
I’m new to Ghost, just started having a look from yesterday. Now it looks like Ghost isn’t able to output posts on static pages, correct me if I’m wrong.
So I’ve found a solution which makes it possible to output posts on static pages, with the {{#get}} helper:
{{#get "posts"}}
{{#foreach posts}}
... do something with all featured pages...
{{/foreach}}
{{/get}}
The {{#foreach}} helper only loops through the data that is available, so once the post gets old enough to not be shown on page 1, you’ll no longer see the post if you use {{#foreach}} + {{#has}} .
The {{#get}} helper does a query to fetch the exact data you want, and then you can loop over it using the {{#foreach}} helper.
Equally, to get a post with a particular tag you could use: filter="tag:homepage" note that the value for the tag should be the slug value, if you want to use the tag’s name, then change to filter="tag.name:'Home Page'" .