Could any of you help me out tweaking the code below?
{{#get "posts" include="tags,author" filter="featured:true" limit="1" as |featured|}}
{{#foreach featured}}
{{> "post-card" shouldBeLarge="true"}}
{{/foreach}}
{{/get}}
{{#foreach posts}}
{{#unless featured}}
{{> "post-card"}}
{{/unless}}
{{/foreach}}
Here are my “needs”: I only want one post to be shown as featured in the live site no matter what the content in the backend says. How could I tweak that code so it only gets 1 featured post, and the rest of the featured posts still show up as regular posts in the list below ?
I’m simply trying to prevent editors from having to go back to the admin panel to untick the “featured” in older posts. Also, I still want to have 1 featured post for each tag of my site.
- What’s your URL? does.not.apply.com
- What version of Ghost are you using? latest