• Resolved leigh777

    (@leigh777)


    Hello,

    I’ve had this in my functions.php for a long time and it’s worked great at removing the iCal Links.

    remove_action(‘tribe_events_single_event_after_the_content’, array(‘Tribe__Events__iCal’, ‘single_event_links’));

    After upgrading to 4.4.0.1 it no longer works on two websites.

    Just please correct in the future version or let me know if the method has changed. I didn’t see any mention in the changelog or a different procedure, but maybe I missed it.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Barry

    (@barryhughes-1)

    Hi!

    Sorry for the inconvenience. The method still exists but was modified slightly – try this instead:

    remove_action( 'tribe_events_single_event_after_the_content', array(
    	tribe( 'tec.iCal' ), 'single_event_links' )
    );
    • This reply was modified 8 years, 1 month ago by Barry.
    Thread Starter leigh777

    (@leigh777)

    Hello,

    Thanks Barry works perfectly.

    Regards,

    Leigh

    I found out for myself that you should be able to use this code which can be included in the theme’s functions.php: https://gist.github.com/tripflex/c6518efc1753cf2392559866b4bd1a53

    Then, you just need to swap out the remove_action previously used with:
    remove_class_action('tribe_events_single_event_after_the_content', 'Tribe__Events__iCal', 'single_event_links');

    This successfully removes the default calendar export links.

    @barryhughes-1 Could you say which of these two methods you would recommend to ensure this doesn’t break in the future? Thanks!

    • This reply was modified 8 years, 1 month ago by KZeni.

    Hi @leigh777,

    I believe @kzeni’s comments may help you out here. Thanks for pitching in kzeni! We so appreciate the community helping each other out. ??

    Can you let me know if everything worked out alright with this one for you?

    Thanks,

    Shelby ??

    It appears both options can be used with success. Knowing the officially recommended method would be helpful though, and https://theeventscalendar.com/knowledgebase/change-the-text-for-ical-and-google-calendar-export-buttons/ should definitely get updated with the new method(s) when someone has time.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible Bug: Removing iCal Links no longer works’ is closed to new replies.