Remove the word "Upcoming" in Upcoming Events title

Home Forums Calendar Products Events Calendar PRO Remove the word "Upcoming" in Upcoming Events title

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1497166
    steviger
    Participant

    Hi,

    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

    #1498960

    Hi 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

     

    #1499480
    steviger
    Participant

    Hi 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

    #1499487
    steviger
    Participant

    I 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

    #1500336

    Hi 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

    #1500368
    steviger
    Participant

    Hi 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

    #1500404

    Hi Steven,

    Try changing this part:

    'Upcoming %s' => 'Events'

    Let me know if that helps!

     

    Thanks,

    Jaime

    #1500439
    steviger
    Participant

    Hi Jaime,

    Yep that did the trick, thanks!

    Regards,

    Steven

    #1500497

    Glad 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!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove the word "Upcoming" in Upcoming Events title’ is closed to new replies.