Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Order by Date is no longer working

Solved by Dorian Jepsen View solution

Started by Dorian Jepsen 2 years ago · 4 replies · 283 views
2 years ago

Happy New Year! For anyone that added content to any of my previous posts and I did not reply, THANK YOU! I've barely had time to touch my blog in months. My new year resolution is to spend more time at the computer.


That being said, I added some new pages, but they are not being loaded/displayed by the date in descending order. Below is a snippet of the blog.md file and you can see here that the posts are not displaying in descending order. I'm probably overlooking something simple, but I can't see what it is.

YAML
content:
  items:
    '@self.children'
  limit: 6
  order:
    by: date
    dir: desc
  pagination: true
  url_taxonomy_filters: true
2 years ago

That looks like a fun blog!

But more information about your pages and your setup, please. It's like you're showing us a photo of your plane on the outside and asking us why it doesn't fly.

2 years ago

For me it looks like it's ordered as intended. Last entry was on January 30th 2019, wasn't it?

2 years ago Solution

My theme is a child of the Quark theme.
All of the content pages are item.md files.
I'm not really certain how to specifically give more details about the pages and setup, but the good news is the problem is fixed!

This post was causing an issue with the stylesheet because the video iframe was too wide and it messed up the 2-column layout, therefore the 2nd-newest post that should be at the top of the right column was being pushed halfway down the page in a single column.

This was the iframe code...

TXT
<iframe src='https://www.brighteon.com/embed/6a2ca74f-43b3-4f72-a9fd-f78727d39fa3' width='560' height='315' frameborder='0' allowfullscreen></iframe>

and I changed it to this...

TXT
<iframe src='https://www.brighteon.com/embed/6a2ca74f-43b3-4f72-a9fd-f78727d39fa3' width='100%' height='315' frameborder='0' allowfullscreen></iframe>

I question if that's the proper way to fix it, but it seems to be working.

👍 1
2 years ago

@Karmalakas:
For me it looks like it's ordered as intended. Last entry was on January 30th 2019, wasn't it?

Your reply was posted shortly after I got it figured out and while I was still composing a reply to @hughbris so that's why it looks to be working as intended 😄

👍 1
last edited 01/02/24 by Dorian Jepsen

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 14 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago