I want to show previous concerts (past concerts) under a special tab. I only want to show past concerts, not current or upcoming concerts that is under a different tab. I tried the following code. Using EE 2.x

 {exp:channel:entries channel="concerts" sort="desc" limit="20" show_expired="yes" }

  {if expiration_date < current_time}




This does not work it shows both upcoming concerts and past concerts. I double checked and the past concerts have an expired dates and they have expired.

  • 2
    Can you not just include the stop_before= tag and set that tag to now ? docs.expressionengine.com/latest/channel/… Mar 31, 2017 at 7:09
  • I added to the channel:entries tag: stop_before="{current_time format='%Y-%m-%d %H:%i'} Still show upcoming shows and past show both. Only want past shows.
    – seeingis
    Mar 31, 2017 at 18:26
  • Try adding parse="inward" to the end of your opening channel:entries tag Apr 1, 2017 at 9:35

2 Answers 2


You can use condition like a below:

{if expiration_date < current_time AND expiration_date!=""}

Alternatively,you can use below query to get the records:

    d.field_id_XX AS your_custom_field
    exp_channels AS c NATURAL JOIN
    exp_channel_titles AS t NATURAL JOIN
    exp_channel_data AS d
    c.channel_id = your_channel_id AND
    t.expiration_date != 0 AND
    t.expiration_date < UNIX_TIMESTAMP()
  • There has to be an easier way than this. This is way over my head.
    – seeingis
    Mar 31, 2017 at 16:28
  • 2
    Please check the updated answer.
    – Jainil
    Apr 2, 2017 at 3:59
  • Not working, still shows upcoming concerts and expired concerts both. I want to show only past concerts. Reminder I am using EE 2.10.1.
    – seeingis
    Apr 2, 2017 at 20:08

Expanding on my original comment, it turns out you can use shorthand as well as long format.

  channel= "mychannel"
  start_on = "-12 months"
  stop_before= "yesterday"
  show_expired = "yes"

This will look back 12 mths until yesterday.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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