Home › Forums › Calendar Products › Events Calendar PRO › How to rename all instances of "Event(s)"
- This topic has 2 replies, 2 voices, and was last updated 9 years, 3 months ago by Brian.
-
AuthorPosts
-
August 13, 2014 at 6:41 pm #661744Christian ThomsonParticipant
Hello there,
I am using the Events Calendar Pro along with WooCommerce Tickets to be able to sell Courses. So, I was wondering how I can rename all instances of Events that appear on the front-end to Courses.
I’ve tried adding the code below to my functions.php (as per https://theeventscalendar.com/change-events-calendar-strings-without-editing-language-files/), but it didn’t work 🙁
<br><br>add_filter( 'gettext', 'krogs_event_change_venue_name', 20, 3 ); function krogs_event_change_venue_name( $translated_text, $text, $domain ) { if ( $translated_text == 'Venue:' && $domain == 'tribe-events-calendar' ) { $translated_text = __( 'Location:', 'tribe-events-calendar' ); } elseif( $translated_text == 'Events:' && $domain == 'tribe-events-calendar' ) { $translated_text = __( 'Courses:', 'tribe-events-calendar' ); } return $translated_text; }
<br><br>
Your help is much appreciated.
Thanks!
CintiaAugust 14, 2014 at 12:42 pm #667961BrianKeymasterHello Cintia,
I tried out your coding and was able to get it to work, but it may not be the best method to do this.
I checked your coding and was able to make some changes, but that method will not search out all instances of events and replace them to courses. It will only replace it if it matches exactly.
So for example I have “Website: “and want to change it to “Url:”
Your coding will work there, but if I have “Your Website:” It would not change.
If you are looking to edit all the instances it maybe best to use Poedit(free) and create your version of the language file with Courses instead of Events.
Here is more about poedit from the WordPress Handbook
Here is a how to video
And here is another topic from our forum related to his that might help:
I hope that is enough for you to take it from here, but let me know if you need anything else.
Thanks!
January 14, 2015 at 7:51 am #932649BrianKeymasterSince I haven’t heard back from you here, I’m going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! 🙂
-
AuthorPosts
- The topic ‘How to rename all instances of "Event(s)"’ is closed to new replies.