Support

Home Forums Event Espresso Premium Show only Expired Events

Show only Expired Events

Posted: May 16, 2017 at 6:49 am

Viewing 10 reply threads


slidebird

May 16, 2017 at 6:49 am

Hi

With this SC [ESPRESSO_EVENTS show_expired=true] it shows expired events but also atkive ones… is it possible to show only expired Events?


Josh

  • Support Staff

May 16, 2017 at 1:45 pm

Hi there,

It’s possible but it does involve adding some custom PHP code to your website. Here’s a link that has some example code:

https://gist.github.com/joshfeck/d68b3c6da61c92ce92c4f77a958a20de

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


slidebird

May 20, 2017 at 2:54 am

ok thanks… i put the code into my child theme functions.php but the upcoming events are still in the list… do i have to use a defferent shortcode?


slidebird

May 20, 2017 at 2:56 am

[ESPRESSO_EVENTS_TABLE_TEMPLATE show_expired=true sort=DESC] this shortcode doesnt work at all?!


slidebird

May 22, 2017 at 7:33 am

Hello?


Josh

  • Support Staff

May 22, 2017 at 7:35 am

i put the code into my child theme functions.php but the upcoming events are still in the list… do i have to use a defferent shortcode?

You do not need to use a different shortcode, but you do need to change the specified page slug on line 12 of the code to match your page’s slug.

[ESPRESSO_EVENTS_TABLE_TEMPLATE show_expired=true sort=DESC] this shortcode doesnt work at all?!

Your site will need to have the Table template add-on installed and activated for that shortcode to work.


slidebird

May 22, 2017 at 7:56 am

ok but i dont want to use a table based layout anyway… i just want so use the regular list out but only for expired events… so which shortcode do i have to use now?


Josh

  • Support Staff

May 22, 2017 at 8:16 am

You can use [ESPRESSO_EVENTS show_expired=true].


slidebird

May 22, 2017 at 8:46 am

i use this… but im a total beginner and i dont quite understand what i have to fill in line 12… can you help me with that? the url is http://wordpress-55262-245019.cloudwaysapps.com/ruckblicke/

thx a lot


Josh

  • Support Staff

May 22, 2017 at 9:00 am

On line 12 the sample code has this:

if ( is_page( 'table-template' ) ) {

You change that to be:

if ( is_page( 'ruckblicke' ) ) {

Along with the above, you’ll want to add the title parameter in the shortcode to change the title that appears before the list. e.g.

[ESPRESSO_EVENTS show_expired=true title='Past Events']


slidebird

May 22, 2017 at 9:28 am

works like a charm…

thank you very much… great support

Viewing 10 reply threads

The support post ‘Show only Expired Events’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso