I am using EE 2.8.1 and was wondering if it is possible to get entries from a certain year and further back in time. For example, this is for an archive page. There are pages for each of the last 5 years and that is all working fine, but for anything beyond 5 years I just want a generic archive page.

In short I can't seem to figure out a channel entries tag to say: Get me every entry from this channel that was entered on or before 2010. So I would get all entries from 2010, 2009, 2008, etc.

My first attempt was with a search field, something like this:

{exp:channel:entries channel="press_releases" dynamic="no" search:entry_date="2010-01-01 00:00:00"}

But that just returns every entry. I tried using > signs in the search and still no luck. I'm sure others have had to do this in the past (and I'm surprised I haven't done it before myself), but was drawing a blank and no luck googling.



The start_on="2010-01-01 00:00" parameter should do the trick...

"You can specify a particular date/time on which to start the entries. Only entries that are on or after this date will be included in the display. This parameter is often used together with the stop_before= parameter for limiting the entry display to a specific date range."

  • Thank you for this, I had seen start_on but that actually made it go from 2010 to 2014. But the stop_before worked for my needs. Thank you!
    – 2bsharpdev
    Jul 31 '14 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.