Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Only Show First Initial in Last Name for Listattendees | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Only Show First Initial in Last Name for Listattendees

Only Show First Initial in Last Name for Listattendees

Posted: March 12, 2014 at 8:31 am

Viewing 3 reply threads


Clair Mason

March 12, 2014 at 8:31 am

Hello everyone. I was wondering how I needed to edit the attendee_list.php or short codes.php so that the [listattendee] shortcode shows First Name, First Initial of Last Name, City/state.

Example:
Clair M. Norwalk, CT

Thank you


Anonymous

March 12, 2014 at 8:55 am

Hi Clair,

LISTATTENDEES currently ouputs Gravatar, First Name, Last Name, City/State.

So in effect it seems all you need to change is Last Name to only show the first letter. So if go to event-espresso/templates/ you’ll find attendee_list.php

Copy that file to wp-content/uploads/espresso/templates/

Then on line 91 you’ll find

<li class="attendee_details"> <span class="espresso_attendee"><?php echo $gravatar ?><?php echo stripslashes_deep($fname . ' ' . $lname) . $city_state .'</p>'; ?> </span>

Change that to:

<li class="attendee_details"> <span class="espresso_attendee"><?php echo $gravatar ?><?php echo stripslashes_deep($fname . ' ' . substr($lname, 0, 1)) . $city_state .'</p>'; ?> </span>

That should then only display the First letter of the Last Name.

Hope that helps.


Clair Mason

March 12, 2014 at 8:56 am

Exactly what I was looking for. Thank you so much Tony


Anonymous

March 12, 2014 at 9:27 am

No Problem :)

Viewing 3 reply threads

The support post ‘Only Show First Initial in Last Name for Listattendees’ 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.

Event Espresso - Staging Server