Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Ordering blogposts by publishing date

Solved by pamtbaau View solution

Started by werdi 6 years ago · 27 replies · 1710 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 complanar, 6 days ago
6 147 20 hours ago
Support · by Rick Beebe, 6 days ago
2 103 3 days ago
Support · by blu3prince, 3 days ago
0 55 3 days ago
Support · by alex, 4 days ago
2 96 3 days ago
Support · by Marcel, 2 weeks ago
1 146 4 days ago