The Public Attendee List feature in Event Tickets makes it easy to showcase the attendees of your events right on the single event pages. By default, it only shows the attendee avatars, which is handy but might leave your users wanting a bit more. Imagine how wonderful it would be to enhance that list by adding names next to the avatars. This simple change can make your event feel more connected and inviting for everyone involved. In this article, we’ll walk you through the steps to customize template files and make that happen!
Customizing Public Attendee List
Follow these steps to override and customize the template file and show attendee names along with their avatars in the attendee list:
1- Make a Copy of the Template File
Navigate to the following file within the Event Tickets plugin:
/wp-content/plugins/event-tickets/src/views/blocks/attendees/gravatar.php
Copy the gravatar.php file from this location.
2- Paste the File in Your Theme Directory
Paste the copied file into your active theme’s directory. If the necessary folders don’t exist, create them. Match the following path:
/wp-content/themes/[your-theme]/tribe/tickets/blocks/attendees/gravatar.php
3- Add Attendee Names
Open the newly added file and append the following line of code at the end:
echo $attendee['purchaser_name'];
4- Save Your Changes and Test
Save the changes to the file. Navigate to an event page where the Public Attendee List is displayed. Ensure that attendee names are now displayed with avatars.
Following these simple steps, you can easily personalize the attendee list to display names alongside avatars. This makes your event pages more informative and engaging for everyone involved. Just a quick tip: When you add these attendee names, you may want to sprinkle some CSS to ensure the list is visually appealing and fits perfectly with your site’s design.