Support

Home Forums Event Espresso Premium Show an event's capacity/limit

Show an event's capacity/limit

Posted: May 27, 2016 at 1:55 pm

Viewing 3 reply threads


phillipsdriving

May 27, 2016 at 1:55 pm

How do I show the capacity of an event? I have set my event to have 36 tickets total. I’m creating a custom ticket detail section within a single event page. How do I show that number on the frontend outside of ticket details. Is there a shortcode or some other function that I can use? I have gotten the Start date, end date, start time, end time, number of people registered and the price to show correctly. All I need is the capacity OR remaining number of tickets.


Josh

  • Support Staff

May 27, 2016 at 2:27 pm

It kind of depends whether there are multiple date times where each date time has its own capacity. Here is a github gist that shows a way to get and display the number of spaces left:

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

When you have access to the event object, you can also use one of the built-in methods like:

total_available_spaces()
spaces_remaining_for_sale()


phillipsdriving

May 27, 2016 at 2:40 pm

It’s for a single event. It’s a class that runs from July 1 – July 10th.


Josh

  • Support Staff

May 27, 2016 at 3:38 pm

You can use one of the methods then.

Viewing 3 reply threads

The support post ‘Show an event's capacity/limit’ 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