• Resolved danield4226

    (@danield4226)


    I have read multiple post about this but i just cant seem to get it to do what i want. I want to 1. Make the avatars larger 2. make the avatar link to the user that has booked the event.
    i’m sure this has been covered multiple times i have gone in and tried to make this work in the attendees.php file and have been unsuccessful multiple times i have been able to make it have the avatar and a text link but am not proficient enough with any of it to make it get the users avatar and link it to there profile anyone that can help me with this would have tons of thanks from me. Below is what i currently have. i have also posted about this on here before this is in hopes that other users might have a solution.

    <?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>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</li>';
    			echo '<li><a href="'.get_edit_user_link( $EM_Booking->get_person()->ID ).'">'. $EM_Booking->get_person()->get_name() .'</a></li>';
    		}elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<li>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</li>';
    		}
    	}
    	?>
    	</ul>
    	<?php
    }

    https://wordpress.org/plugins/events-manager/

Viewing 1 replies (of 1 total)
  • To make the avatar larger, change the 50 to your desired size in this line:

    get_avatar($EM_Booking->get_person()->ID, 50)

Viewing 1 replies (of 1 total)

The topic ‘Attending Avatar’ is closed to new replies.