Posted: February 19, 2018 at 5:41 am
|
I have a single date set up for my events and primarily use the Event Table View plugin to display the events for a category. What I’d like to be able to do is within the table display, show the number of available spaces for an event within the listing. I’ve read through the support posts and the nearest one to this is this one, could this be integrated into the table view as it’d be a valuable piece of information to include in the listings without the requirement of clicking on the actual event registration to see available via the quantity dropdown. Using EE4 along with the Events Table View. |
Hi cvg, You can use this example code for the part that outputs the actual “spaces available” text: https://gist.github.com/joshfeck/f19c050bc47682ff30b62202cfcde9d8 You’ll also need to add an html column heading and column to the event table view template. This is best done by copying the template from the plugin and putting the copy into your WordPress theme. If your theme gets updates, it’s best to set up a child theme. The documentation has more specific instructions on how to set up your custom template file: https://eventespresso.com/wiki/events-table-view-template-add-on/#customizations |
|
|
Thanks Josh, I rem’d out the if ( $datetime->sold_out() ) and the if ( $limit == EE_INF ) { if( $remain > 4 ) { That shouldn’t present any problems for a single date event should it? Seems to work ok for now. |
Do you not have a ‘limit’ set on the datetime of the event? If so that’s why.
No, it shouldn’t.
So as long as you have a limit on your ticket(s) it should work fine. |
|
|
Cheers Josh, |
The support post ‘Displaying spaces available on Events Table View’ 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.