“If you would like to be added to the wait list for this event, then please enter your name and email address, and we will contact you when spaces become available.”
I need to add another sentence. Please advise.
Thanks
I tried adding this to my function file but it didn’t change the text..
//* Waitlist custom message
function my_waitlist_filter_gettext( $translated, $original, $domain ) {
if( $domain == 'event_espresso' ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'XXSign Up For The Wait List' => 'Join the Wait list', // button text
'XXJoin Now' => 'Wait List Form', // main heading
'XXIf you would like to be added to the wait list for this event, then please enter your name and email address, and we will contact you when spaces become available.XX'
=> 'Please enter your information and we\'ll be in touch.',
'Preferred Option' => 'Preference', // field label
'Join The Wait List' => 'Sign me up', // submit button text
// 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', 'my_waitlist_filter_gettext', 10, 3 );
It’s because the first string in each array item must match the original string.
e.g. XXSign Up For The Wait List is not the original string. Sign Up For The Wait List is the original string.
Viewing 4 reply threads
The support post ‘Wait List Custom Message’ 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.