Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

News page

  • #6672
    Avatar photo[anonymous]

    Hello,

    Is there a way to create a news page, which would group all the articles “markes as featured” ?

    Thanks for your help.

    #6673
    Avatar photoBob

    It is. You should use the {{#featuredPosts}} tag for your post loop on the front page.

    https://getpublii.com/dev/homepage-tags/#homepage-tags

    #6674
    Avatar photo[anonymous]

    I am very sorry, but I don’t know where to put #featuredPosts…

    Could you explain, please ?

    Thanks in advance.

    #6677
    Avatar photoBob
    1. Open the index.hbs file (Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME)
    2. Find the post loop which should start with {{#each posts}} tag.
    3. Replace it with {{#each featuredPosts}}

    Now, your homepage should display only the featured posts.

    #6683
    Avatar photo[anonymous]

    That’s fine, thank you !