Home Forums Event Espresso Premium Change Attendee #1 to Ticket #1

Change Attendee #1 to Ticket #1

Posted: July 12, 2018 at 2:51 pm


July 12, 2018 at 2:51 pm

I am trying to change the wording on the registration form from “Attendee #1” to “Ticket #1”

I have used the code suggested in another forum

But when I add the code below – it causes an issue with the site and the page content does not load. What am I missing?

Below is the code I am using.

//* Adjust the messaging for attendee 1 in registration checkout
function ee_change_messaging_attendee_1_registration_checkout( $content ) {
if (is_page(1346)) {
$content = str_replace( ‘Attendee 1’, ‘Ticket 1’, $content);
return $content;
add_filter( ‘the_content’, ‘ee_change_messaging_attendee_1_registration_checkout’, 12 );


  • Support Staff

July 12, 2018 at 3:00 pm

Hi there,

You would be better using something like this:

Change line 11:

To 'Attendee %d' => 'Ticket %d',

You can either change line 10 to us 'Attendee Information' => 'Ticket Information', or remove it completely.


July 12, 2018 at 3:14 pm

Thanks for your quick response – I’ve tried this (code below) but it did not change anything. What have I done wrong?

function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Attendee Information’ => ‘Ticket Information’,
‘Attendee %d’ => ‘Ticket %d’,
// Add some more strings here

// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );

return $translated;

add_filter( ‘gettext’, ‘mycustom_filter_gettext’, 10, 3 );


  • Support Staff

July 12, 2018 at 4:13 pm

Hmm, ok I did a little digging and it’s not something you have done, it’s from a change we’ve made to how that string is translated.

You’ll now need to use a different function for the 'Attendee %d' => 'Ticket %d', translation.

Something like this:

You can remove the first function if you wish, or use it to translate other strings, it just will not work the string you are currently wanting to change.

(For any translators reading this we switched from __() to _x() so the function above needs to use a different filter for that string.)


July 12, 2018 at 4:26 pm

Thank you – that’s worked!

The support post ‘Change Attendee #1 to Ticket #1’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Porter 8 months, 1 week ago ago

Topic Tags


This topic is:
Do NOT follow this link or you will be banned from the site!