Home › Forums › Calendar Products › Events Calendar PRO › Customize Default Wording: Change 'Events' to 'Schedule'
- This topic has 5 replies, 2 voices, and was last updated 7 years, 7 months ago by
zericoni.
-
AuthorPosts
-
August 24, 2018 at 10:42 am #1605264
zericoni
ParticipantI am using the Events Calendar as a schedule to inform patients what days certain doctors are available. I would like to change how some of the default text displays on the front end. For example, I want to change ‘Events for August 2018’ to ‘Schedule for August 2018’, wherever ‘Events’ is used. Can this be edited in a language file?
August 27, 2018 at 4:36 pm #1607117Brendan
KeymasterHi there!
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,
BrendanAugust 28, 2018 at 6:25 am #1607539zericoni
ParticipantHi Brendan,
Thanks for input. I added the snippet to the top of my child theme’s functions.php file like this:$custom_text = array(
‘Events’ => ‘Calendar’,
);However, it had no affect on the output shown in the attachment. What else should I try?
Thank you.
August 28, 2018 at 4:38 pm #1608275Brendan
KeymasterHi there,
The instructions are a little confusing so I apologize. You will need to add the entire function to get this to work as seen below:
function tribe_custom_theme_text ( $translation, $text, $domain ) { // Put your custom text here in a key => value pair // Example: 'Text you want to change' => 'This is what it will be changed to' // The text you want to change is the key, and it is case-sensitive // The text you want to change it to is the value // You can freely add or remove key => values, but make sure to separate them with a comma // This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" $custom_text = array( 'Events' => 'Schedule', ); // If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) { $translation = $custom_text[$translation]; } return $translation; } add_filter('gettext', 'tribe_custom_theme_text', 20, 3);Let me know how that goes.
Thanks,
BrendanAugust 28, 2018 at 5:05 pm #1608294zericoni
ParticipantMany thanks! Perfect solution!
August 29, 2018 at 6:35 am #1608690Brendan
KeymasterAwesome, glad it worked!
Thanks,
BrendanSeptember 20, 2018 at 9:35 am #1626563Support 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 ‘Customize Default Wording: Change 'Events' to 'Schedule'’ is closed to new replies.
