• I’m trying to link name to the user profile but i’m still getting link only on current logged user. What Im doing wrong?

    <?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;
                $person_id = $EM_Booking->get_person()->ID;
    			$user_id = $person_id->ID;
    			um_fetch_user( $user_id );
    			echo '<li><a href="'. um_user_profile_url() .'">'. $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><a href="'. um_user_profile_url() .'">'. $EM_Booking->get_person()->get_name() .'</a></li>';
            }
        }
        ?>
        </ul>
        <?php
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • '<li><a href="<?php echo um_user_profile_url(); ?>">'. $EM_Booking->get_person()->get_name() .'</a></li>';

    You can try this line and see if that works, but that code you’ve posted is not from the UM plugin. You are actually posting at the wrong support board.

    Yes i know that code is not from UM but that code is working well but i cant link UM profile to the name.

    This PHP get name & surname and with um_user_profile_url i cant link this name to his profile.. I still getting only url to actually log-in user

    This is like shooting darts in the night.

    One more try:
    echo '<li><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo esc_attr(um_user('display_name')); ?>">'. $EM_Booking->get_person()->get_name() .'</a></li>';

    Try with the echo and without it as stated before above and may have to tweak it a bit to make it work.

    Otherwise, customization questions about other WordPress plugins are, for the most part, never discussed on this free UM support board.

    Good luck.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t link profile’ is closed to new replies.