Let’s say you want to change the labels for the Google Calendar, iCal, and Outlook download buttons on a single event page. You’ve seen them before when looking at one of the events on your site. They pop up just below the content for the event and look a little something like this:
If you’ve poked around the plugin files, you might be driving yourself mad trying to find out where to change those labels and that’s because you won’t find them there. Thankfully, there’s a pretty handy snippet you can add to your theme’s functions.php
file to change those labels.
This snippet does the following:
- Changes “Add to Google Calendar” to “Subscribe Here”
- Changes “Add to iCalendar” to “Export Here”
Of course, you can edit the snippet to have those labels say anything you want.
add_filter(
'tec_views_v2_subscribe_links_gcal_label',
function ( $label, $link_obj, $view ) {
if ( !is_singular( 'tribe_events' ) ) { return $label; }
return $link_obj->get_single_label( $view );
},
10,
3
);
Outlook filters
You can also change the labels for the various Outlook options. Simply replace the Google Calendar and iCalendar filters with one of the following:
Outlook 365: tec_views_v2_subscribe_link_outlook-365_visibility
Outlook Live: tec_views_v2_subscribe_link_outlook-live_visibility
Outlook ICS File: tec_views_v2_subscribe_link_outlook-ics_visibility