• Hi,

    Is it possible to show and event’s attendees in alphabetical order?

    I currently use #_ATTENDEESLIST to show all attendees but it would be easier to find people on that list if it was alphabetical if there’s any way to do this?

    Thanks,

    Jon

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    at the moment you need to do it manually by modifying template file at events-manager/templates/placeholders/attendeeslist.php

    to use templates: https://wp-events-plugin.com/documentation/using-template-files/

    eg. wp-content/themes/Your Theme/plugins/events-manager/placeholders/attendeeslist.php

    Thread Starter joncwhall

    (@joncwhall)

    Hi,

    Thanks for that ??

    I get the content of that file as the following, but am not sure which bit to edit and to what, if you have any suggestions?

    Thanks again for your help,

    Jon

    <?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 ‘

    • ‘. $EM_Booking->get_person()->get_name() .’
    • ‘;
      }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
      echo ‘

    • ‘. $EM_Booking->get_person()->get_name() .’
    • ‘;
      }
      }
      ?>

      <?php
      }

    You would need to pro grammatically reorder the $people array after it’s been created.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Attendees in alphabetical order?’ is closed to new replies.