• Skip to primary navigation
  • Skip to footer navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Fangirl

WordPress Consultant Sallie Goetsch

  • speakerdeck icon
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact

Moving the Gcal and iCal Links in The Events Calendar

June 26, 2016 by Sallie Goetsch 2 Comments

This entry is part 8 of 13 in the series Modern Tribe Tutorials
Google Calendar and iCal links displayed below event meta and above related events in The Events Calendar

By default, The Events Calendar shows the “+ Google Calendar” and “+ iCal Export” buttons (a.k.a. the Gcal and iCal links) immediately below the event description (post content) and above the event meta (details, organizer, venue, map). This placement is a little awkward. I would expect these links to be either at the very top, as part of the event header, or at the bottom, below the event meta. Or even in both places if event descriptions tend to be long. For that matter, it’s occurred to me to move the event meta, which contains the most pertinent information, below the event header and above the event content, but that’s an exercise for another time.

Here are the Gcal and iCal links in their standard position:

Google Calendar and iCal links in their standard position after the event content and before the event meta

To move them below the event meta, but above the related events, add the following to your theme’s functions.php file:

//* Relocate ical and gcal links below meta
remove_action('tribe_events_single_event_after_the_content', array('Tribe__Events__iCal', 'single_event_links'));
add_action('tribe_events_single_event_after_the_meta', array('Tribe__Events__iCal', 'single_event_links'), 5);

You need the priority number when adding the links in order to be sure they appear above the Related Events, like this:

Google Calendar and iCal links displayed below event meta and above related events in The Events Calendar

If you wanted to position the Gcal and iCal links before the content, you would change your add_action() to

add_action('tribe_events_single_event_before_the_content', array('Tribe__Events__iCal', 'single_event_links'));

That defaults to displaying the Gcal and iCal links below the event featured image but above the content. I’m not aware of a hook you can use to put the links above the featured image. That might require editing the template file.

Gcal and iCal links before the content in The Events Calendar

I was mildly appalled to discover that the Modern Tribe knowledgebase actually includes a tutorial on hiding these links with CSS rather than removing them. I really don’t know why you would hide them rather than remove them. display:none is generally frowned-upon these days. However, they do have a custom plugin for removing all export links, if you’d prefer getting rid of them to relocating them. (If you only want to remove the links from the single event view, just use the remove_action() code above without adding the action back in anywhere.)

Modern Tribe Tutorials Series Navigation<< Previous PostNext Post >>

Related Items

  • screenshot: final output of [tribe-events-list] shortcode on Livresque du Noir
    Horizontal Output for Events Calendar Pro Shortcode
  • Events Calendar Pro list widget showing list date and featured image
    Removing the List Date from Events Calendar Pro List Widget
  • detail of Events Calendar Pro widget on Dit Gentofte website
    Displaying Multiple Rows of Events in Events Calendar Pro Widget

Share this post:

Share on Twitter Share on Facebook Share on Pinterest Share on LinkedIn Share on Email

Filed Under: Using WordPress Tagged With: Tutorial, Events Calendar Pro

Reader Interactions

Comments

  1. Gary says

    July 4, 2017 at 6:20 am

    Thank you, this worked a treat for our site! Appreciated!

    Reply
  2. Cenay Nailor says

    August 21, 2019 at 2:21 pm

    Just a quick update to make this code current. They changed the second parameter’s form. This was what I got working when I tried to move the links to below the content.

    `
    remove_action( ‘tribe_events_single_event_after_the_content’, array( tribe( ‘tec.iCal’ ), ‘single_event_links’ ) );
    add_action(‘tribe_events_single_event_after_the_meta’, array(tribe( ‘tec.iCal’ ), ‘single_event_links’), 5);
    `

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

What I Write About

  • Book Reviews
  • Content Strategy
  • Design
  • Hosting and Servers
  • Most Valuable Plugins
  • There's a Plugin for That
  • Using WordPress
  • Widgets
  • WordPress Consulting
  • WordPress Events

Series

  • Interviews (5)
  • Checking Up on Your Website (4)
  • Client from Hell (5)
  • WordCamps (17)
  • WP-Tonic Roundtable (30)
  • Modern Tribe Tutorials (13)


More in this series:

  • Creating a Horizontal List Widget with Featured Images in Events Calendar Pro
  • Change Photo View in Events Calendar Pro to Equal-Height Grid with Venue & Location
  • Horizontal Output for Events Calendar Pro Shortcode
  • Displaying Multiple Rows of Events in Events Calendar Pro Widget
  • Defining Event Image Size in The Events Calendar by Modern Tribe
  • Removing the List Date from Events Calendar Pro List Widget
  • Adding Non-Standard Pricing Info in The Events Calendar Using ACF
  • Moving the Gcal and iCal Links in The Events Calendar
  • Horizontal Events Widget for Events Calendar Pro — Now with Flexbox!
  • CSS Grid Layout for Event List Widget with Flexbox Fallback
  • How to Change Event Image Size in The Events Calendar without Modifying Templates
  • CSS Grid Layout for Events Calendar Pro Widget Shortcode
  • Update: Moving the Events Calendar iCal and Gcal links in 2018

Follow Sallie on Twitter

    Sorry, no Tweets were found.

RSS Latest News from the East Bay WordPress Meetup

  • Does It Work? Using The New CSS Layout with Rachel Andrew
    Things change rapidly in the WordPress world. The content in this post is more than a year old and may no longer represent best practices.Description Over the past two years, […] The post Does It Work? Using The New CSS Layout with Rachel Andrew appeared first on East Bay WordPress Meetup.
  • Speaker Training
    Get the workbook and slides for the October 2019 speaker training, plus background and pro tips. The post Speaker Training appeared first on East Bay WordPress Meetup.
  • SEO Audit Template & Resources
    Our November speaker, John Locke, graciously provided a template for an SEO audit report. You can download it as a Microsoft Word or PDF document. The post SEO Audit Template & Resources appeared first on East Bay WordPress Meetup.

Footer

Contact Info

2063 Main St #133 · Oakley, CA 94561

+1 (510) 969-9947

author-izer

sallie [at] wpfangirl [dot] com

Location

Map of East Contra Costa County

I live in Oakley, CA and run a WordPress Meetup in Oakland, CA. Don't confuse them!

Subscribe for New Posts

  • Since I blog on an unpredictable schedule, you might want to subscribe by email. I'll also send out occasional announcements about events.

  • Privacy Policy: I will never sell or rent your contact information.

  • This field is for validation purposes and should be left unchanged.
  • Contact
  • Colophon
  • Comment Policy
  • Privacy Policy
  • Five for the Future

Copyright © 2023 · Utility Pro on Genesis Framework · WordPress · Log in

MENU
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact