Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter YesPapa

    (@yespapa)

    Ok. I found this :

    if($EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
    	$people[] = $EM_Booking->get_person()->ID;
    	echo '<li><a href='.bp_core_get_user_domain( $EM_Booking->get_person()->ID ).'>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</a></li>';
    }elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    	echo '<li><a href='.bp_core_get_user_domain( $EM_Booking->get_person()->ID ).'>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</a></li>';
    }

    It is working perfectly but the link goes to the attendees default page.

    Is there a way to link to the attendees profile page instead of the attendees default page?

    Thank you.

    Are you using BuddyPress and is that the profile you want to link to?

    Thread Starter YesPapa

    (@yespapa)

    Yep. It is the buddypress profile I want to link.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    here’s another snippet which may help you with this – https://pastebin.com/CpQTLFFb

    As for where to paste this : https://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

    Thread Starter YesPapa

    (@yespapa)

    Work great and link the user profile default page. Is there a way to link to :

    domain.com/members/user-1/profile/ instead of domain.com/members/user-1/

    Thank you.

    Thread Starter YesPapa

    (@yespapa)

    Work great and link to the user profile default page. Is there a way to link to :

    domain.com/members/user-1/profile/ instead of domain.com/members/user-1/

    Thank you.

    I think the only way to do that would be to run a filter on the BuddyPress function used in the code (bp_core_get_userlink) to format the link as you want it.

    Thread Starter YesPapa

    (@yespapa)

    Hi,

    Sorry I don’t know why but the script don’t work. Any link on the user avatar!?

    And I have another question : Is there a way to add the user name when passing over the image (like buddypress)?

    Thank you.

    Thread Starter YesPapa

    (@yespapa)

    Try to play with the attributes but don’t work :

    <?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>'.bp_core_get_userlink($EM_Booking->get_person()->ID, $no_anchor = true/false, $just_link = true/false).'</li>';
                    }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
                            echo '<li>'.bp_core_get_userlink($EM_Booking->get_person()->ID, $no_anchor = true/false, $just_link = true/false).'</li>';
                    }
            }
            ?>
            </ul>
            <?php
    }
    Thread Starter YesPapa

    (@yespapa)

    Hi,

    I don’t know why but this code didn’t work. I can have a link on the member avatar!

    Do you know why? Perhaps it could be integrate by default?

    Thank you.

    Thread Starter YesPapa

    (@yespapa)

    Any idea what this code doesn’t work?

    This one from @angelo_nwl : https://pastebin.com/CpQTLFFb

    Thread Starter YesPapa

    (@yespapa)

    Ok. It’s working. It’s me …

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Help to make #_ATTENDEES a link’ is closed to new replies.