Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- 1. Create this folders in your theme directory at wp-contents > themes > Your Theme > (create this folders and php file) plugins > events-manager > placeholders > attendeeslist.php
- 2. edit attendeeslist.php and paste this snippet
- 3. save
- note: noticed #_BOOKINGFORMCUSTOM{team} and you can replace team with your booking form field id under Events > Forms Editor
- */
- ?>
- <?php if (!( $EM_Event->get_bookings()->get_booked_spaces() > 0 )): ?>
- </br>None so far.</br>
- <?php endif; ?>
- <?php
- /* @var $EM_Event EM_Event */
- $people = array();
- $EM_Bookings = $EM_Event->get_bookings();
- if( count($EM_Bookings->bookings) > 0 ){
- ?>
- <ul class="event-attendees">
- <?php
- foreach( $EM_Bookings as $EM_Booking){
- if($EM_Booking->get_spaces() >= 2 && $EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people)){
- $people[] = $EM_Booking->get_person()->ID;
- echo get_avatar( $EM_Booking->get_person()->ID, $size = '50' ),' ',$EM_Booking->get_person()->get_name() .' (confirmed ',$EM_Booking->get_spaces() .')';
- echo '<br/><strong>NAME</strong>: '.$EM_Booking->get_person()->get_name().'<br/>';
- echo '<strong>TEAM</strong>: '.$EM_Booking->output('#_BOOKINGFORMCUSTOM{team}');
- }
- if($EM_Booking->get_spaces() == 1 && $EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people)){
- $people[] = $EM_Booking->get_person()->ID;
- echo get_avatar( $EM_Booking->get_person()->ID, $size = '50' );
- echo '<br/><strong>NAME</strong>: '.$EM_Booking->get_person()->get_name().'<br/>';
- echo '<strong>TEAM</strong>: '.$EM_Booking->output('#_BOOKINGFORMCUSTOM{team}');
- }
- }
- ?>
- </ul>
- <?php
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement