Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    We have a shortcode – #_ATTENDEES – which I think is what you’re looking for:
    http://wp-events-plugin.com/documentation/placeholders/

    That will give you a list of users booked into an event.

    Thread Starter m3ndi3

    (@m3ndi3)

    Perfect Thank you!!!

    Thread Starter m3ndi3

    (@m3ndi3)

    Is there any way I can make the attendees names clickable to their profile?

    Thread Starter m3ndi3

    (@m3ndi3)

    I added the attendees list template to my single-event.php and I’m pretty confident with editing php files… What I need to know though, is what the code for the link to the user profile page is…

    echo '
    
    <li>'. $EM_Booking->get_person()->get_name() .'</li>
    ';

    This is the code I would add the <a href="">to right?

    Thread Starter m3ndi3

    (@m3ndi3)

    And is it possible to output the comment they entered during booking?

    Thread Starter m3ndi3

    (@m3ndi3)

    I figured it out 😛 Here’s the code for anyone who needs the same thing:

    <?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
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    	foreach( $EM_Bookings as $EM_Booking){
    		if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
    			$people[] = $EM_Booking->get_person()->ID;
    			echo '<li>';
    			echo '<a href="[insert homeurl/author]'. $EM_Booking->get_person()->get_name().'">'.$EM_Booking->get_person()->get_name().'</a>';
    			echo '</li>';
    			echo '<li>'. $EM_Booking->booking_comment .'</li>';
    		}elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}
    	}
    	?>
    	</ul>
    	<?php
    } ?>

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    thx for sharing!

    @m3ndi3
    I tried your code and the links bring me to the right link for the user.
    Can you help me please.
    Appreciate your help

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘List event participants’ is closed to new replies.