Simple page with public list of Attendees of a particular event

Home Forums Ticket Products Event Tickets Plus Simple page with public list of Attendees of a particular event

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1379719
    Pablo
    Participant

    Hi, we want to create a page to see a list (table) with a public list of attendees.

    Thanks in advance!

    Pablo

    #1380432
    Jennifer
    Keymaster

    Hi Pablo!

    Are you looking to display all attendees for all events on one page, or do you want to create multiple pages that each display the attendees for a particular event?

    This will likely require a customization, in which case our themer’s guide will be the place to start. However, if you can provide some more details on exactly what you’re looking for, I’ll be happy to point you in the right direction!

    Thanks,

    Jennifer

    #1382234
    Pablo
    Participant

    This reply is private.

    #1382700
    Jennifer
    Keymaster

    Hi Pablo,

    Nice job with the customization! You should be able to change the order…can you send me a copy of what you did (preferably via GitHub gist link) and I’ll see what I can recommend?

    Thanks,

    Jennifer

    #1382726
    Pablo
    Participant

    This reply is private.

    #1387984
    Pablo
    Participant

    Hi again Jennifer, any answer?

    Thanks in advance,

    Pablo

    #1394713
    Jennifer
    Keymaster

    Hi Pablo,

    So sorry for the delayed response, your thread didn’t show up on my end as waiting on a reply for some reason – sorry about that!

    The attendee count and list are currently in the same template (wp-content/plugins/event-tickets-plus/src/views/attendees-list.php), so to separate them, you could do something like the following:

    First copy the attendee list template into your child theme for editing by following these instructions. You can remove the code for the attendee list from that template and add the following to your single event template (which you will also want to copy into your child theme for editing) above the tribe-events-footer section:

      $avatar_html ) { ?>

    Let me know how this works for you and if you have any questions!

    Thanks,

    Jennifer

    #1395683
    Pablo
    Participant

    Hi Jennifer, works great!!! Thanks a lot!! only one more question… can I change avatar with attendee name??

    Thanks in advance!!!

    Pablo

    #1395780
    Jennifer
    Keymaster

    Hi Pablo,

    I’m glad that worked for you! There is an example in this post where one of our developers added the attendee name below the avatar. If you’d like to remove the avatar entirely, you can simply comment out the following line from the example:

    <?php //echo $avatar_html; ?>

    Since you’ve separated the attendee count, you’ll want to ignore that part of the template and just copy the attendee list part. This will modify/replace what you copied into your single event template – no need to modify your attendee-list.php file!

    Let me know how it goes!

    Thanks,

    Jennifer

    #1395970
    Pablo
    Participant

    Hi Jennifer, I just copy you said below your code, like this:

    <!-- Ateendees -->
    	<ul class='tribe-attendees-list'>
    <?php if( class_exists( Tribe__Tickets_Plus__Attendees_List ) ) {
     
        $attendees_list = Tribe__Tickets_Plus__Attendees_List::get_attendees( $event_id );
     
        foreach ( $attendees_list as $attendee_id => $avatar_html ) { ?>
            <li class='tribe-attendees-list-item'><?php echo $avatar_html; ?></li>
        <?php }
    } ?>
    </ul>
    
    <br>
    <h3>NEW CODE (BELOW) Do not show names only avatars</h3>
    <ul class='tribe-attendees-list'>
    	<?php foreach ( $attendees_list as $attendee_id => $avatar_html ) { ?>
    		
    		<?php
    		$attendee_name = '';
    		foreach ( $attendees as $key => $attendee_obj  ) {
    			if ( isset( $attendees[ $key ]['attendee_id'] ) && $attendee_id == $attendees[ $key ]['attendee_id'] ) {
    				$attendee_name = $attendees[ $key ]['purchaser_name'];
    			}
    		} ?>
    
    		<li class='tribe-attendees-list-item'>
    			<?php echo $avatar_html; ?>
    			<?php if ( ! empty( $attendee_name ) ) : ?>
    			<br>
    			<span class="tribe-attendees-list-item-name">
    				<?php echo $attendee_name; ?>
    			</span>
    			<?php endif ?>
    		</li>
    	<?php } ?>
    	</ul>
    <!-- Ateendees END -->
    

    And names not show 🙁

    #1398569
    Jennifer
    Keymaster

    Hi Pablo,

    I’m sorry it’s not working for you…can you try adding the following and see if this makes a difference? I tested this out on my end and was seeing the names and avatars:

      $avatar_html ) { ?>

      $attendee_obj ) {
      if ( isset( $attendees[ $key ]['attendee_id'] ) && $attendee_id == $attendees[ $key ]['attendee_id'] ) {
      $attendee_name = $attendees[ $key ]['purchaser_name'];
      }
      } ?>







    Let me know how it goes!

    #1400078
    Pablo
    Participant

    Same problem, I only see avatars.

    #1408986
    Jennifer
    Keymaster

    Hi Pablo,

    Sorry for the delay here, but I think I found the problem…if you’re adding this code to the single-events.php file, you’ll need to add this line:

    <?php $attendees = Tribe__Tickets__Tickets::get_event_attendees( $event_id ); ?>

    You can add it above this line:

    <?php foreach ( $attendees_list as $attendee_id => $avatar_html ) { ?>

    I tested this out in my single-event.php file and was getting the names…let me know if you get the same!

    Thanks,

    Jennifer

    #1422437
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Simple page with public list of Attendees of a particular event’ is closed to new replies.