Support

Home Forums Event Espresso Premium Displaying remaining tickets for each event on event list page.

Displaying remaining tickets for each event on event list page.

Posted: June 13, 2020 at 7:07 am

Viewing 3 reply threads


Nick

June 13, 2020 at 7:07 am

Hi,

I am using a basic event list page that shows all upcoming events: http://opendialogueapproach.co.uk/events/

I am wondering if it is possible to include information about the number of tickets still available for each event on this page.

Thanks,

Nick


Tony

  • Support Staff

June 15, 2020 at 7:43 am

Hi Nick,

You could just set the event list to include the ticket selector, your current function should then show the remaining tickets there.

Event Espresso -> Events -> Templates (tab) -> Event list pages (section) -> Display Ticket Selector.

Set that to Yes and it should display on the above output.


Nick

June 15, 2020 at 10:31 am

Thanks Tony. I have a couple of questions:

1. Is the only way of showing information about remaining tickets within the ticket selector? As I only want to show something like “There are x spaces left for this event” and not show all of the tickets, I would have to use CSS to hide most of the ticket selector div in the events list page. If this is the only way to do so, I can of course do this, but just thought I’d check.

2. When I enable the option to show the ticket selector on the events list page, it only shows if I remove my custom template for archive-espresso_events.php. These are the templates I have in my child theme folder. I am not sure which one I need to edit to have the option of showing the ticket selector:

archive-espresso_events.php
content-espresso_event_attendees.php
content-espresso_events-datetimes.php
content-espresso_events-details.php
content-espresso_events-header.php
content-espresso_events-shortcode.php
content-espresso_events-thumbnail.php
content-espresso_events-tickets.php
content-espresso_events-venues.php
content-espresso_events.php
loop-espresso_events.php
single-espresso_events.php


Tony

  • Support Staff

June 15, 2020 at 10:41 am

1. Is the only way of showing information about remaining tickets within the ticket selector? As I only want to show something like “There are x spaces left for this event” and not show all of the tickets, I would have to use CSS to hide most of the ticket selector div in the events list page. If this is the only way to do so, I can of course do this, but just thought I’d check.

No, it’s not, but your custom function hooks into a hook fired on the ticket selector.

You can use another hook or create a shortcode.

Where exactly do you want the output to be on each event there?

2. When I enable the option to show the ticket selector on the events list page, it only shows if I remove my custom template for archive-espresso_events.php. These are the templates I have in my child theme folder. I am not sure which one I need to edit to have the option of showing the ticket selector:

So, because you are using an archive-espresso_events.php EE assumes you are taking complete control of the output and doesn’t automatically inject the event details into the content.

We can touch on this shortly as it depends what you do with regards to the above.

Viewing 3 reply threads

The support post ‘Displaying remaining tickets for each event on event list page.’ 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