Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Ordering blogposts by publishing date

Solved by pamtbaau View solution

Started by werdi 6 years ago · 27 replies · 1810 views
6 years ago

@werdi Is there a github repo I could clone to test? You can DM me the link if you would like to keep it private.

6 years ago

@pamtbaau I'm afraid I have no idea how github repos work. 🙈

6 years ago

@werdi, Respect! it is very brave to admit that in public... ;-)

But you do know your way with Git itself, do you???

👍 1
6 years ago

@pamtbaau No shame whatsoever 😂 I know OF github and repos but know nothing about how it works. I know that people can post issues and others can work on them but how it all happens, no idea. And I want to respect your time so this is no fishing for instructions; I know that google has the answer to everything.

6 years ago

@pamtbaau This issue is starting to make sense now. Turns out, publish_date orders the posts by "last saved". Date orders the posts by date. When both were mixed, it was difficult to tell one from the other.

👍 1
6 years ago

@werdi, I still don't understand what publish_date has to do with it, except... When you save a page which has only publish_date set, you update its modified_date. Since your ordering is dir:desc, pages with latest date or modified_date will move to the top.

6 years ago

@pamtbaau Exactly. And in that hierarchy, the posts where only publish_date has been set override those who have only date. Those with only date retain their order, though, even after being modified.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 1 week ago
4 160 7 days ago
Support · by nwhitfield, 1 week ago
2 140 1 week ago
Support · by stell, 3 weeks ago
5 371 2 weeks ago
Support · by gravinator, 1 month ago
5 564 2 weeks ago
Support · by Gravver, 3 weeks ago
6 348 3 weeks ago