Prevent showing of future articles

Hi,

For my Kirby blog I would like to pre-publish articles, and having them show up as soon as the future date arrives.

I use dates in the sorting of my content folder:

20160402-z-achsen-taster

and also as field within my articles:

----
Date: 2016-05-28
----

Currently I go through my articles like this:

<?php foreach ($page->children()->visible()->sortBy('date','desc') as $p): ?>

Could I add something like this in the chain above?

->date_before_tomorrow()->

Daniel

1 Like

Add ->filterBy('date', '<=', time()) :wink: where β€˜date’ is the name of the date field.

1 Like