Sign in

News page

  • This topic has 4 replies, 2 voices, and was last updated 7 months, 3 weeks ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6672
    clac1

    Hello,

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

    Thanks for your help.

    #6673
    Bob

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

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

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6674
    clac1

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

    Could you explain, please ?

    Thanks in advance.

    #6677
    Bob
    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.

     

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6683
    clac1

    That’s fine, thank you !

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘News page’ is closed to new replies.