Support

Home Forums Events Calendar Add-on EE 4 Calendar Tooltip – Change "Register Now" Button Text

EE 4 Calendar Tooltip – Change "Register Now" Button Text

Posted: June 5, 2014 at 1:49 pm

Viewing 7 reply threads


Andrea Janes

June 5, 2014 at 1:49 pm

Hi,

How do I change the “Register Now” button text in the calendar tooltip for EE 4?


Lorenzo Orlando Caum

  • Support Staff

June 5, 2014 at 3:34 pm

Hi Andrea,

Please try the following code snippet:

function ee_change_register_now_button_calendar( $translated, $original, $domain ) {
 
    $strings = array(
        'Register' => 'Sign up',
    );
 
    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_register_now_button_calendar', 10, 3 );

Change Sign Up in the code above to your new text.

Reference:
https://gist.github.com/lorenzocaum/b85b1fdfaba8ab7c9f8e

It should go into your theme’s functions.php file or a site specific plugin:

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


Lorenzo


Andrea Janes

June 5, 2014 at 3:52 pm

Hi Lorenzo,

I inserted the snippet in the themes functions.php file but it had no affect on the button text. You can see the page here – http://boroughsofthedead.com/homepage/tours-calendar/


Lorenzo Orlando Caum

  • Support Staff

June 5, 2014 at 6:06 pm

Try relocating it to the middle of the child theme’s functions.php file.

It should look like this:

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


Lorenzo


Andrea Janes

June 6, 2014 at 2:03 pm

Moved it to the top, still no change. Here is a screenshot of the code in the functions.php file –

http://boroughsofthedead.com/homepage/wp-content/uploads/2013/12/EE-snippet.png

Can you see anything wrong?

Thanks for you help


Lorenzo Orlando Caum

  • Support Staff

June 9, 2014 at 10:59 am

Hello,

That looks correct. Is your software up to date?

The latest version of Event Espresso 4 is 4.2.5.


Lorenzo


Andrea Janes

June 9, 2014 at 11:21 am

EE is Version 4.2.5.p and calendar plugin is 3.0.0.reg


Lorenzo Orlando Caum

  • Support Staff

June 9, 2014 at 11:43 am

Hi Andrea,

That is what I tested the sample code on so it should be working.

Could you please create a temporary WordPress admin login and a temporary SFTP/FTP login so we can take a closer look at this issue?

Please share that temporary login through the secure link below:

https://eventespresso.com/send-login-details/

To prevent delays in troubleshooting, be sure to double check your information on the form before submitting.


Lorenzo

Viewing 7 reply threads

The support post ‘EE 4 Calendar Tooltip – Change "Register Now" Button 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