Posted: January 25, 2013 at 4:55 am
|
Morning all, I am looking for a way to show what spaces are still available on courses using the event espresso table. Any suggestions? example page on my site Any help would be much appreciated. many thanks John
|
Hi John, I’d recommend using the [ATTENDEE_NUMBERS] shortcode for this: https://eventespresso.com/wiki/shortcodes-template-variables/#attendee-numbers Depending on where you want the counter to show up, it can be used on a page like this:
or within template code like this:
|
|
|
Unfortunately this only shows a zero. |
Hi John, Which version of Event Espresso are you using, and which template file are you customizing? |
|
|
I am currently on the latest version, 3.1.30.5.P and trying to modify the custom files template espresso_table.php Ideally I would like to show tickets left/max tickets I am using this code / it currently shows 0/ <—Blank Any ideas? |
|
|
|
|
|
|
|
Crying out loud ! your code button doesn’t work either!!!!1 |
Hi John, I’m not sure why you were having trouble with posting the code. Sorry about that. So here’s the code:
The $event_id variable isn’t declared as such in espresso_table.php. You can use
Seth is actually going through some of those custom files templates and updating them to use some of the newer Event Espresso functions and variables. |
|
Wow. That serves me right for copying and pasting that code from pastebin. Here’s a second crack:
Make sure you remove that ! in just before the second echo statement. |
|
|
Thank you that worked. |
The support post ‘Spaces available counter’ 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.