Home Forums Event Espresso Premium EE4 – show remaining tickets on schedule page for one specific ticket type?

EE4 – show remaining tickets on schedule page for one specific ticket type?

Posted: August 8, 2018 at 3:07 pm

Steve Wilder

August 8, 2018 at 3:07 pm


We have events with multiple ticket types. On our schedule page, we’d like to show the # of tickets remaining for each event under one specific ticket type, instead of under all ticket types. Is this possible with a shortcode or a hook? Thanks!


  • Support Staff

August 8, 2018 at 5:22 pm

Hi Steve,

Possibly, but can you link me to the page you are referring to so I know we are looking at the same location, or add screenshot highlighting the section you want to change?

Steve Wilder

August 9, 2018 at 10:01 am

Here’s the link:

Each show date on that page shows the tickets remaining, but for the entire event, instead of just for a specific ticket type. We offer general admission tickets and special packages for each event, and we want just the remaining GA tickets to show on the schedule page. Does that make sense?


  • Support Staff

August 9, 2018 at 10:25 am

Yeah that makes sense.

So do you follow a specific naming convention for all of you general admission tickets? For example are they always named ‘general admission’, or is the general admission always set as required?

To do what you need, you’ll need to pull that general admission ticket from the event and output the number of spaces available, the function used now just pulls them all and works from there. The problem is that using the ticket name is a little fragile, if you don’t set it to ‘General Admission’ (or whatever we try to use to pull the ticket) that row on the table wont work.

If the ticket is always required (and only a single ticket type is required) we could pull the the required tickets for the event, then output the number of spaces available for that/those ticket(s).

Would that work?

Steve Wilder

August 9, 2018 at 10:27 am

Yep, they’re always named General Admission, and they’re the only required tix for each event. Sounds like that would work great!


  • Support Staff

August 10, 2018 at 7:31 am

Ok, so your using a custom version fo the table view template, so I’m assuming you are comfortable with PHP or someone on your team is?

You’ll need to do something like this –

So in place of where you output the remaining spaces currently, you would output the $remaining_spaces value from the above function.

If you post the content of your custom table view template I can take a look and advise further if needed.

Steve Wilder

August 10, 2018 at 8:51 am

That did the trick and works perfectly! Thanks so much!


  • Support Staff

August 10, 2018 at 8:56 am

You’re most welcome.

Just to note what it’s doing for future readers, rather pulling a specific ticket by name for each event, its pulling any tickets that are set as required on the event looping over them all to calculate the number of spaces remaining.

Pulling by ticket name is just a little too fragile imo, you can work around typos and such by getting a little creative but I think this works better for this setup.

The support post ‘EE4 – show remaining tickets on schedule page for one specific ticket type?’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 6 months, 1 week ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!