Home › Forums › Calendar Products › Events Calendar PRO › Remove the word "Upcoming" in Upcoming Events title
- This topic has 9 replies, 2 voices, and was last updated 8 years, 1 month ago by
steviger.
-
AuthorPosts
-
April 5, 2018 at 2:45 am #1497166
steviger
ParticipantHi,
How can we remove the word “Upcoming”? I know how to change the title completely (https://vimeo.com/76708200) but since we have two different cities displaying the events, that won’t doe the trick. We need just: Events in city Y and Events in city X.
Thanks in advance!
Regards,
Steven
April 6, 2018 at 11:09 am #1498960Jaime Marchwinski
KeymasterHi Steven,
Thanks so much for reaching out!
You can use the third-party plugin, Say What?, in order to modify the wording of the title.
Be sure to use the exact string that you’d like to change in order for it to work.
Let me know how that goes!
Thanks,
Jaime
April 7, 2018 at 3:38 am #1499480steviger
ParticipantHi Jaime,
I was hoping that a small code in my Child’s function.php would do the trick. I’d rather not use yet another plugin. I don’t need anything translated b.t.w. Just want to remove the word “Upcoming”. So I’m afraid this plugin won’t help me.
Regards,
Steven
April 7, 2018 at 3:54 am #1499487steviger
ParticipantI thought I’d give it a try anyway but I don’t get it to work. Please see screenshot for the strings I’ve used.
Regards,
Steven
April 9, 2018 at 4:39 am #1500336Jaime Marchwinski
KeymasterHi Steven,
Instead of adding another plugin, you can try adding and modifying the snippet provided in the following article to change the wording of any string:
https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/
Let me know how that goes!
Thanks,
Jaime
April 9, 2018 at 5:21 am #1500368steviger
ParticipantHi Jaime,
Thanks for your reply. Unfortunately it didn’t work. Since I’m not exactly a wizard with codes, I probably did something wrong. My code
function tribe_custom_theme_text ( $translation, $text, $domain ) { $custom_text = array( 'Upcoming Events' => 'Events' ); // 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);When I give you admin access, would you mind to have a look yourself? I’m realy lost see.
Thanks it advance!
Regards,
Steven
April 9, 2018 at 6:08 am #1500404Jaime Marchwinski
KeymasterHi Steven,
Try changing this part:
'Upcoming %s' => 'Events'Let me know if that helps!
Thanks,
Jaime
April 9, 2018 at 6:24 am #1500439steviger
ParticipantHi Jaime,
Yep that did the trick, thanks!
Regards,
Steven
April 9, 2018 at 6:57 am #1500497Jaime Marchwinski
KeymasterGlad we could help, you are welcome back in our support forums any time!
Since you marked this thread as Resolved, I am going to close this thread.
Have a great week!
-
AuthorPosts
- The topic ‘Remove the word "Upcoming" in Upcoming Events title’ is closed to new replies.
