Support

Home Forums Pre-Sales Change wording of field names

Change wording of field names

Posted: November 19, 2015 at 7:57 am


Paul

November 19, 2015 at 7:57 am

Hi all,

Very new to Event Espresso – is there any way that I can change the field titles to custom text? i.e. where under an event it says ‘Ticket Options ‘ I need it to say ‘Registration Options’ or something similar.

Only working with a demo site at present.

All input appreciated.


Lorenzo Orlando Caum

  • Support Staff

November 19, 2015 at 8:08 am

Hi Paul, those labels are translation ready so you could use a gettext filter to change them out. Here is an example:

function ee_custom_messaging( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Ticket Options' => 'Registration Options',
        // 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', 'ee_custom_messaging', 10, 3 );


Lorenzo

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