Show how many tickets left per event

WordPress Event Management, Calendars & Registration Forums General Question Show how many tickets left per event

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 9 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12404

    Is there a way to show how many tickets are left per event?
    I want to be able to show XX spaces left per event for admin & user if possible

    Thanks

    Tina Stent
    #12407

    Hi Tina,

    Yes you can. There is eo_get_remaining_tickets_count() for this (see codex with examples).

    How you use it would depend if you are selling tickets by date or by series. The codes has example code you can put in your single-event.php template (if you’re using one) or equally the event-meta-single-event.php template (for event information that appears at the top of the event page).

    Additionally this could go in the template eo-ticket-picker.php (found in event-organiser-pro/templates if you are selling tickets by series.

    Note: All template files should be copied to your theme before editing, asou will loose any changes made to the plug-in files when you update.

    Stephen Harris
    #12468

    Thanks Stephen,

    exactly where in the file would I place this code – I tried before the event details and the code just appeared on the page

    Tina Stent
    #12470

    Hi Tina,

    If for, instance, you wanted it to appear at the top along with the event details, then somewhere at the bottom of the file event-meta-single-event.php (- see https://github.com/stephenharris/Event-Organiser/blob/master/templates/event-meta-event-single.php) (e.g. line 116 or after 119).

    You will need to include the added in php tags:

    <?php
       ... code here ...
    ?>

    I’ll be in touch via e-mail in case you need any further help with this.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.