arizonai
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Event Calendar] [Plugin: Ajax Event Calendar] Event List Widget Font SizeNever Mind, found an answer here http://wordpress.org/support/topic/plugin-ajax-event-calendar-widget-size-10?replies=3
The reason its not working is because $EM_Booking is not part of the loop, but I don’t know how to fix it. It seems to me that if there was a $EM_Person->spaces that it would work.
I too need the exact same scenario. I have it working fine, except that the get_spaces() seem to return the last booking’s number of spaces.
Here is my code:
<?php /* @var $EM_Event EM_Event */ $people = array(); foreach($EM_Event->get_bookings() as $EM_Booking){ $people[$EM_Booking->person->ID] = $EM_Booking->person; } ?> <BR>The following members are attending this event: <BR><BR> <?php foreach($people as $EM_Person): ?> <p> <?php echo $EM_Person->user_firstname . " " . $EM_Person->user_lastname . " + " . $EM_Booking->get_spaces(); if ($EM_Booking->get_spaces() > 1) echo " Additional People"; else echo " Additional Person"; ?> <?php endforeach; ?>
Viewing 3 replies - 1 through 3 (of 3 total)