Order by featured posts in Home Page


#1

hi guys

how to change loop.hbs with this result:

  1. havin’ a list of all post (10 for page)
  2. havin’ featured post by first
  3. then other posts
  4. all order by data (ASC)

?

I’ve tried many solutions but no one is correct.

Important: I have a ghost-hosting solution, not self-host.


#2

Hi @giTron, your question isn’t really clear.

I assume you’re trying to change the display order of the default collection in routes.yaml?

https://docs.ghost.org/docs/dynamic-routing

Maybe post some examples of what you changed that didn’t work and then someone can guide you to a solution.


#3

Tnx for your answer Hannah.

I try to explain with an example


CONDITION:

There are 50 posts:

  • 23 are featured posts
  • 27 are not-featured posts
  • pagination: 10 posts for page

RESULT

Example of an output posts listing, in the home page, with pagination:

page 1: 10 featured posts
page 2: 10 fetured post
page 3: 3 featured post and 7 not-featured post
page 4: 10 not-featured post
page 5: 10 not-featured post

  • Featured posts are ordered by date ASC
  • Notfeatured posts are ordered by date ASC

#4

I’ve tried many solutions but no one is correct.

What have you tried?

Have you read the documentation that I linked you to?