Support

Home Forums Event Espresso Premium Multiple Registrations: How do I change the "Attendee N" text

Multiple Registrations: How do I change the "Attendee N" text

Posted: April 6, 2023 at 7:15 am

Viewing 5 reply threads


mbeede@tracom.com

April 6, 2023 at 7:15 am

Greetings – For the registration page (multiple registrants) I need to change the “Attendee N” section header text to be “Participant N”.
E.g. “Attendee 1” needs to be “Participant 1” and so on.
How do I do that without changing the EE source code?

Thanks in advance – Mark


Tony

  • Support Staff

April 6, 2023 at 7:25 am

Hi Mark,

This snippet should do what you are looking for:

https://gist.github.com/Pebblo/de0b054ecaeb7d333ca1b823f2b02efa

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


mbeede@tracom.com

April 6, 2023 at 7:49 am

Tony – What is the difference between this filter:

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

}
add_filter( ‘gettext’, ‘my_custom_filter_gettext’, 10, 3);

And the one in that snippet:

function mycustom_filter_gettext_with_context( $translated, $original, $context, $domain ) {

}
add_filter( ‘gettext_with_context’, ‘mycustom_filter_gettext_with_context’, 10, 4 );

I have a lot of strings in the first filter, but changing “Attendee N” did not work in the 1st filter, and did in the 2nd. Why both filters?

ALSO how can I make the “Attendee N” font to make it a little bigger – I’m having trouble getting the CSS to work for that…

Thanks again – Mark


Tony

  • Support Staff

April 6, 2023 at 9:04 am

It depends on which function was used to add the string, that string was added with:

esc_html_x(
    'Attendee %d',
    'Attendee 123',
    'event_espresso'
)

The _x give context to the string and is run through a different filter within WordPress itself.

The others you are using are likely added with esc_html__()

ALSO how can I make the “Attendee N” font to make it a little bigger – I’m having trouble getting the CSS to work for that…

Something like this should work:

.spco-attendee-lgnd {
    font-size: 2rem;
}


mbeede@tracom.com

April 6, 2023 at 9:37 am

Ok that makes sense thanks. The CSS worked too.

THANK YOU for your continued support and quick response 🙂
It is very much appreciated!!!


Tony

  • Support Staff

April 6, 2023 at 10:01 am

You’re most welcome 🙂

Viewing 5 reply threads

The support post ‘Multiple Registrations: How do I change the "Attendee N" text’ 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