Remove iCal and Google Calendar Links from Single Event Views

Single events have two "export" links by default—one link that lets you export the event to your Google Calendar, and one that exports the event into iCal format (the .ics file format).

It's not uncommon for site owners to want to hide these export links. There are numerous reasons why you might want to prevent exporting one format or the other, and while a more comprehensive, complete method for removing all front-end event export links can be found in another knowledgebase article here, this article itself presents a method for hiding export links on single events only.

Getting Started

For starters, the following screenshot might help clarify what is being referred to in this article. The screenshot is of a single event, which by default will have both export links visible in the lower-left corner of the event description. Note the "+Google Calendar" link on the left and the "+iCal Export" link on the right:

Screenshot

This shows the default export links that display on single event views.

Hiding the "+Google Calendar" Link

To hide just the "+Google Calendar" link, add CSS like the following to the bottom of your theme's style.css file:


body.single-tribe_events .tribe-events-cal-links a.tribe-events-gcal {
display: none !important;
}

Hiding the "+iCal Export" Link

To hide just the "+iCal Export" link, add CSS like the following to the bottom of your theme's style.css file:


body.single-tribe_events .tribe-events-cal-links a.tribe-events-ical {
display: none !important;
}


That's all! You can hide one link or the other using the corresponding CSS above, or just add both blocks of CSS code to hide both links.