Posted: August 26, 2014 at 5:16 am
|
Am trying to add the available spaces to a custom template, having used a predesigned template which showed the venue and dates which I don’t want. I just want the title, availability and register button. If I copy the code the firewall blocks it but the page I am developing is here if that helps: http://www.beachvolleyballinc.com/NEW/coaching-and-camps/availability I’d like it to show either 2/10 under an attendees title or else 8 under a spaces available title. All ideas welcome! |
|
Hi, In the code you could use the shortcode [ATTENDEE_NUMBERS], such as : echo do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="num_attendees"]');?> / |
|
thanks for that. i did try it but it just comes up with 0 for every entry even though there are registered attendees. here’s my page code: http://pastebin.com/xyJ7CDpT |
The reason for this is the template does not have an $event_id variable which is used within the code Dean provided. You’ll need to swap out both instances of $event_id in that code for $event->id |
|
|
thanks tony but it still shows 0 for each one. in the system some of the camps have attendees registered and paid? |
|
Hi, The change to $event->id made it work: http://take.ms/kkVHv “in the system some of the camps have attendees registered and paid?” I assume by that, that at least some attendees have been marked as complete in the admin area? |
|
hi dean |
|
Yep, green and round is good. I double checked it and it’s definitely working. Did you definitely modify the $event_id in the shortcode to $event->id? That’s the only reason I can think why it won’t work. |
|
hmm i changed this bit, was there anywhere else i needed to change?: |
|
Hi, It should read: event_id=”‘.$event->id.'” so just the variable that gets changed not the parameter name. |
|
ahaaaa! that worked a treat, thanks dean 🙂 |
The support post ‘Adding Spaces Available to Custom Template’ 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.