Support

Home Forums Event Espresso Premium Change wording of Tickets

Change wording of Tickets

Posted: October 24, 2014 at 12:32 pm

Viewing 4 reply threads


Jan Cline

October 24, 2014 at 12:32 pm

I am using Event Espresso 4 with a Genesis StudioPress Theme on the latest version of WordPress. I would like to change the word “Tickets” to “Registrations”, and have tried all the directions for a site-specific plugin, functions.php, and the Quick Localization plugin. None of them have worked.

Here is the code I used in functions.php and the site-specific plugin:
function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Tickets' => 'Registrations',
'Confirm and go to payment page' => 'Complete registration',
'Ticket' => 'Registration',
// 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 );

Here is a test registration page:
http://inlandnwchristianwriters.com/events/test/

Thank you.


Lorenzo Orlando Caum

  • Support Staff

October 24, 2014 at 12:38 pm

Hi Jan,

You are almost there. Please take a look at this:

https://gist.github.com/lorenzocaum/b4bbd1bb839a1c80b2b4


Lorenzo


Jan Cline

October 24, 2014 at 2:35 pm

Thank you so much, Lorenzo! That did it!

Now is there any way to completely remove the line “* Please note that a maximum number of 10 registrations can be purchased for this event per order.” via functions? It did not look like it had its own CSS element to hide.


Lorenzo Orlando Caum

  • Support Staff

October 24, 2014 at 3:14 pm

Hi Jan,

Please try the following CSS in your child theme’s style.css file or a plugin like Reaktiv CSS builder or My Custom CSS:

.event-tickets .smaller-text.lt-grey-text {display:none;}

It should then disappear:

http://cl.ly/image/0h1a0f452J2j


Lorenzo


Jan Cline

October 24, 2014 at 3:58 pm

Thank you! I was just worried that might some other crucial text somewhere in Event Espresso since it was hiding text based on size/color/format.

Viewing 4 reply threads

The support post ‘Change wording of Tickets’ 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