Support

Home Forums Event Espresso Premium hiding "sold out" events from an event listing

hiding "sold out" events from an event listing

Posted: October 9, 2012 at 9:07 am


themakeden

October 9, 2012 at 9:07 am

Hi there,

I’ve been using the “category” short code to list all events in a particular category. However, many of the events are full / “sold out”, but still show up in the list, which means the registrant needs to scroll down to find an event that still has spaces left in it. Is there any way to add code which would allow me to hide “sold out” events from this event list?
Thanks very much!


Josh

  • Support Staff

October 9, 2012 at 1:54 pm

Hi Irene,

Yes, it’s possible to add a conditional to the event_list.php template. In most cases all you would need to do would be to wrap this conditional around the default case:

default:
     if (get_number_of_attendees_reg_limit($event_id, 'num_completed') <= $reg_limit) {
      //Uncomment to show active status array
      //print_r( event_espresso_get_is_active($event_id));
       include('event_list_display.php');
      }
break;

In Event Espresso version 3.1.27.1 this is starting on line 343.

The support post ‘hiding "sold out" events from an event listing’ 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