Support

Home Forums Event Espresso Premium How to Remove (USD) text from all reg pages?

How to Remove (USD) text from all reg pages?

Posted: November 4, 2014 at 9:57 am

Viewing 3 reply threads


Greg Brailsford

November 4, 2014 at 9:57 am

I tried searching for (USD) in POEdit but there is no string in the language file that controls display of this string. Is there some other way to remove it? We’re in the USA and displaying (USD) takes up space on the reg form and is unnecessary. Thanks.


Lorenzo Orlando Caum

  • Support Staff

November 4, 2014 at 10:28 am

Hi,

Try this gettext filter. It can be added to your child theme’s functions.php file or a site specific plugin.

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


Lorenzo


Tony

  • Support Staff

November 4, 2014 at 10:41 am

Depending on exactly which elements you want removing you can also do this using CSS.

From only the registration form:

.spco-attendee-panel-dv .currency-code {
display: none;
}

The registration form and ticket selector:

.spco-attendee-panel-dv .currency-code, 
.tkt-slctr-tbl .currency-code {
display: none;
}

This will remove all spans with the class of curreny-code, on all pages:

span.currency-code {
display: none;
}

We recommend using either the My Custom CSS or Reaktiv CSS Builder plugins to add custom styles such as these.

Hope that helps.

  • This reply was modified 10 years ago by Tony. Reason: Added custom style info


Greg Brailsford

November 4, 2014 at 1:15 pm

Tony,

Thanks! Your CSS solution worked. The custom function Lorenzo provided did not. Thanks both for helping!

Viewing 3 reply threads

The support post ‘How to Remove (USD) text from all reg pages?’ 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