Looking to change the wording of “virtual events” or “hybrid events” to something else? You can totally do that by adding a filter that will suit your needs. Read on to find out more.

We have a bunch of new template tags that allow us to change any part of the virtual events label:

  • tribe_get_virtual_label: This will change the term “Virtual”
  • tribe_get_virtual_lowercase: This will change the term “virtual”
  • tribe_get_virtual_event_label_singular: This will change the term “Virtual Event”
  • tribe_get_virtual_event_label_singular_lowercase: This will change the term “virtual event”
  • tribe_get_virtual_event_label_plural: This will change the term “Virtual Events”
  • tribe_get_virtual_event_label_plural_lowercase: This will change the term “virtual events”
  • tribe_hybrid_label: This will change the term “hybrid”
  • tribe_hybrid_label_singular: This will change the term “Hybrid Event”

Inside each of those template tags is a filter by a similar name, so we’ll want to know which of these we’d like to change. In most cases, we’ll want to change all of them so that the verbiage stays consistent across all of our virtual events.

We can also change the global “events” term, so a combination of filters can work here as well if we’d like the term “events” to be different everywhere on our site. We have an article about that here: Changing the term “Event(s)”. But the important part is that if you use those filters to change the global event(s) term then the terms will change here as well – automatically.

So if we set “Event” via the filter tribe_event_label_singular to “Webinar” that will propagate to the function tribe_get_virtual_event_label_singular which will return “Virtual Webinar”. The similarity in naming is intentional to help us associate them.

It’s also worth mentioning that the same caveats about translations from that article apply to these filters as well! The filters are applied after translation!

As a first example, to alter the capitalized version of the “Virtual” term add the following to our theme’s functions.php file:

add_filter( 'tribe_virtual_label', function(){ return 'Online'} ); 

To alter the lowercase version of the “virtual” term, add this to our theme functions.php:

add_filter( 'tribe_virtual_label_lowercase', function() { return 'online'} ); 

Note that these snippets also change the phrase “virtual events” to “online events” and “Virtual Events” to “Online Events”.

But let’s say we want to change the term “Virtual Event” to “Webinar” (dropping the “event” term). Use tribe_virtual_event_label_singular and it will override “Virtual Event” to “Webinars”.

add_filter( 'tribe_virtual_event_label_singular', function(){ return 'Webinars'} );

It’s worth mentioning that these only change the front-end usage of these terms – for some clarity we decided to limit changing the term in the admin.

So as a recap:

// This will change all uses of the word "Virtual" to "Online.
// It will also change all uses of the term "Virtual Events" to "Online Events".
add_filter( 'tribe_virtual_label', function() { return 'Online'; } );

// This will change all uses of the word "virtual" to "online.
// It will also change all uses of the term "virtual events" to "online events".
add_filter( 'tribe_virtual_label_lowercase', function() { return 'online'; } );

// This will change all uses of the term "Virtual Event" to "Webinar".
add_filter( 'tribe_virtual_event_label_singular', function() { return 'Webinar'; } );

// This will change all uses of the term "virtual event" to "webinar".
add_filter( 'tribe_virtual_event_label_singular_lowercase', function() { return 'webinar'; } );

// This will change all uses of the term "Virtual Events" to "Webinars".
add_filter( 'tribe_virtual_event_label_plural', function() { return 'Webinars'; } );

// This will change all uses of the term "virtual events" to "webinars".
add_filter( 'tribe_virtual_event_label_plural_lowercase', function() { return 'webinars'; } );

One last one for funsies:

What if we want to change the event term – but only for virtual events (getting a bit sneaky here!) and we don’t want to change the “virtual” term? (we’ve broken up the code a bit so you can see what we’re doing a bit better)

// This will change all uses of the term "Virtual Event" to "Virtual Classroom".
add_filter(
	'tribe_virtual_event_label_singular',
	function() {
		return tribe_get_virtual_label() . 'Classroom';
	}
);

// This will change all uses of the term "virtual event" to "virtual classroom".
add_filter(
	'tribe_virtual_event_label_singular_lowercase',
	function() {
		return tribe_get_virtual_label_lowercase() . 'classroom';
	}
);

// This will change all uses of the term "Virtual Events" to "Virtual Classrooms".
add_filter(
	'tribe_virtual_event_label_plural',
	function() {
		return tribe_get_virtual_label() . 'Classrooms';
	}
);

// This will change all uses of the term "virtual events" to "virtual classrooms".
add_filter(
	'tribe_virtual_event_label_plural_lowercase',
	function() {
		return tribe_get_virtual_label_lowercase() . 'classrooms';
	}
);