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
June 5, 2014 at 3:34 pm
Add New Note to this Reply
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
Add New Note to this Reply
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
June 5, 2014 at 6:06 pm
Add New Note to this Reply
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
Add New Note to this Reply
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
June 9, 2014 at 10:59 am
Add New Note to this Reply
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
Add New Note to this Reply
EE is Version 4.2.5.p and calendar plugin is 3.0.0.reg
Lorenzo Orlando Caum
June 9, 2014 at 11:43 am
Add New Note to this Reply
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