Home › Forums › Calendar Products › Events Calendar PRO › Change text of events plugin
- This topic has 5 replies, 4 voices, and was last updated 9 years, 5 months ago by
Minori.
-
AuthorPosts
-
November 15, 2016 at 8:10 am #1192442
Minori
ParticipantHello!
I’d like to change the text of the events calendar plugin to change “events” to “training opportunities”. I want to apply this on the title – Upcoming events– and –Past events-. As well as on the next events/past events navigation.
Best regards
Nora
November 15, 2016 at 9:28 pm #1192972Geoff B.
MemberGood evening Nora and welcome back!
Thank you for reaching out to us.
I would love to help you with this topic.The simplest solution would be to use the following snippet: https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/
Let me know how that goes.
Best regards,
Geoff B.November 17, 2016 at 3:39 am #1193761Minori
ParticipantHi! I’ve tried to change the code on functions.php but then the page just crashes, I don’t know if I didn’t understand the instructions, I’ve placed the code on top of the functions.php file like so:
<?php $custom_text = array( 'Venue' => 'Location', 'Related %s' => 'Similar %s', /** * Autoloader * * Automatically load files when their classes are required. */ spl_autoload_register( 'avada_register_classes' ); function avada_register_classes( $class_name ) { if ( class_exists( $class_name ) ) { return; } if ( 'TGM_Plugin_Activation' == $class_name ) { return; } $class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php'; if ( file_exists( $class_path ) ) { include $class_path; } if ( false !== strpos( $class_name, 'Avada_AvadaRedux' ) ) { $class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'avadaredux' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php'; if ( file_exists( $class_path ) ) { include $class_path; } } }and also like this
<?php /** * Autoloader * * Automatically load files when their classes are required. */ spl_autoload_register( 'avada_register_classes' ); function avada_register_classes( $class_name ) { if ( class_exists( $class_name ) ) { return; } if ( 'TGM_Plugin_Activation' == $class_name ) { return; } $class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php'; if ( file_exists( $class_path ) ) { include $class_path; } if ( false !== strpos( $class_name, 'Avada_AvadaRedux' ) ) { $class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'avadaredux' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php'; if ( file_exists( $class_path ) ) { include $class_path; } } }but either way the site crashes,help!
Nora
November 17, 2016 at 7:00 pm #1194285Geoff B.
MemberHey Nora,
Thank you for writing back.
I am sorry this crashed you site.It certainly was not my intention. Yikes!
Actually, there are 3 main things to be aware of for this code to work properly:
- Do not paste the opening <? ph p tag (since there is already one in your functions.php file).
- The code to use is actually found at the very bottom of that page (where it says “View Code snippet”. Everything else leading up to it is just for the explanation.
- You will need to tweak the code to your needs. In your case, that will most likely mean changing
$custom_text = array(
'Venue' => 'Location',
'Related %s' => 'Similar %s',
);
to
$custom_text = array(
'events' => 'training opportunities',
'Events' => 'Training opportunities',
);Let me know if that helps.
Have a great day!
Geoff B.
December 9, 2016 at 8:35 am #1203947Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Change text of events plugin’ is closed to new replies.
