• Resolved hristkop

    (@hristkop)


    Hello,

    I can’t change the label ‘Event Category’ that is showed in the single event page, right next to Venue and Organizer columns. I’ve tried with the code example that I’ve found here: https://theeventscalendar.com/knowledgebase/k/change-the-wording-of-any-bit-of-text-or-string/ , but nothing happens.

    Here is the code that I’m using:

    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(
    		'%s Category' => 'Project',
    	);
    
    	// 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);
    
    • This topic was modified 3 years, 4 months ago by hristkop.
Viewing 1 replies (of 1 total)
  • Plugin Support Truman

    (@tdorn)

    Hi there,

    I answered your other post (We ask that you not double post in the future) with a solution I believe should work for you!

Viewing 1 replies (of 1 total)
  • The topic ‘Change the ‘Event Category’ label’ is closed to new replies.