如何使用 ghost 获取所有付费帖子和 public
How to get all posts that are paid and public with ghost
我正在尝试创建自定义页面示例。com/free 全部免费 post 和示例。com/pro
获得所有报酬 posts 但我无法解决它:
{{!< default}}
{{#post}}
<div class='c-archive'>
<h1 class='c-archive__title'>{{ title }}</h1>
</div>
<div class='o-grid'>
{{#get 'posts' filter="visibility:paid"}}
{{#foreach posts}}
{{> post-card }}
{{/foreach}}
{{/get}}
</div>
{{/post}}
这是获得所有报酬的解决方案post
{{!< default}}
{{#post}}
<div class='c-archive'>
<h1 class='c-archive__title'>Pro Lessons</h1>
</div>
<div class='o-grid'>
{{#get 'posts'}}
{{#foreach posts visibility='all'}}
{{#has visibility="paid"}}
{{> post-card-custom }}
{{/has}}
{{/foreach}}
{{/get}}
</div>
{{/post}}
我正在尝试创建自定义页面示例。com/free 全部免费 post 和示例。com/pro 获得所有报酬 posts 但我无法解决它:
{{!< default}}
{{#post}}
<div class='c-archive'>
<h1 class='c-archive__title'>{{ title }}</h1>
</div>
<div class='o-grid'>
{{#get 'posts' filter="visibility:paid"}}
{{#foreach posts}}
{{> post-card }}
{{/foreach}}
{{/get}}
</div>
{{/post}}
这是获得所有报酬的解决方案post
{{!< default}}
{{#post}}
<div class='c-archive'>
<h1 class='c-archive__title'>Pro Lessons</h1>
</div>
<div class='o-grid'>
{{#get 'posts'}}
{{#foreach posts visibility='all'}}
{{#has visibility="paid"}}
{{> post-card-custom }}
{{/has}}
{{/foreach}}
{{/get}}
</div>
{{/post}}