Tried to search before posting but haven’t been able to find anything.
How would I change the way that the ‘show attendees’ shortcode displays full name? I instead would like it to just display the username of the person who is attending.
I can see the following code in (content-espresso_event_attendees.php): $contact->full_name();
I’m pretty sure this is where I would change it but I’m unsure what to change this to in order to get back usernames instead of full names?
Thank you for the reply! Yes EE4 user integration is installed and the events are only visible to logged in users. I tried that code but it doesn’t seem to be displaying the correct user. It seems to be displaying a different users username with the number 2 in front of it.
One thing I did notice though was that the Gravatar has the correct username in it’s alt tag, but i’m unsure how that’s generated to try and take the same code.
Would really appreciate any further help you could offer.
Hmm, I have no idea where the number 2 is coming from, but I’ve altered the code to pull in the user based on the email address of the contact. If no user can be found for that email it outputs the contact details as it normally would.
That should then show the username for an account with the same email address used to create that contact.
Viewing 3 reply threads
The support post ‘Attendee list show username instead of full name’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.