Home › Forums › Calendar Products › Events Calendar PRO › Removing Export Links Plugin
- This topic has 6 replies, 3 voices, and was last updated 8 years, 6 months ago by
Del.
-
AuthorPosts
-
September 11, 2017 at 7:39 pm #1347827
Del
ParticipantI see others are having issues with the “Remove Export Links” plugin. I installed it but it does remove them from either the main calendar view nor the individual posts as advertised. I realize you offer the plugin without support. Can you at least confirm that it is known to work with the current version of Events Calendar Pro? I saw in some other forum posts that the plugin may have been not operational with some past versions of TECP. And unfortunately, my installation of TECP requires a site login to view the calendar, so if you would like to/need to see it in action, let me know how to get you a login ID and PW privately. Thanks, Del
========================
PLEASE LEAVE FOR SUPPORT
Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/remove-not-hide-export-links-in-event-views/September 12, 2017 at 6:56 pm #1348355Geoff B.
MemberGood evening Del and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
I would love to help you with this topic.You are right, that plugin is broken. It will soon be replaced by an extension.
In the meantime, I just updated the following snippet: https://gist.github.com/GeoffEW/b8f0bb5fc2b8510c6ad4f0b60fcf3fb9
You could apply it in the functions.php file of your theme (without the PHP tag at the top).
Let me know how that goes.
Best regards,
Geoff B.September 14, 2017 at 7:03 am #1349156Del
ParticipantGeoff:
Thanks for the reply. I downloaded the zip, extracted it copied and pasted the code into my child theme functions.php, removed the php tag at the top and, unfortunately, crashed my site/server (500 error) due to a coding error:
PHP Fatal error: Cannot redeclare class Tribe__Events__Remove__Export__Links in /nas/content/live/cliftonclub/wp-content/themes/x-child/functions.php on line 116
Fortunately I had made a backup copy of my functions.php and was able to recover after a fashion.
If you can figure out what the issue is, let me know and I will setup a staging server (this time) and try it again with some revised code. In the mean time, I will just take my site live with the export links in place and hope the users don’t get too confused by them.
Thanks, Del
September 14, 2017 at 10:07 am #1349365Mathew
ParticipantDel,
Here’s two snippets that I have had success with in the latest versions of TEC. Give them a try. As you know, back-up your functions.php before modification.
// -----------------------------------------------------------------------------------
// Removes iCal Export and Google Calendar button from single view
// https://theeventscalendar.com/support/forums/topic/removing-ical-and-google-calendar-links/#dl_post-1234845
// -----------------------------------------------------------------------------------function tribe_remove_single_calendar_links() {
if ( function_exists( 'tribe' ) ) {
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) );
}
}
add_action( 'init', 'tribe_remove_single_calendar_links' );// -----------------------------------------------------------------------------------
// Removes EXPORT MONTH'S EVENTS button from month view
// https://theeventscalendar.com/support/forums/topic/removing-ical-and-google-calendar-links/#dl_post-1234920
// -----------------------------------------------------------------------------------function tribe_remove_calendar_export_links() {
if ( function_exists( 'tribe' ) ) {
remove_action( 'tribe_events_after_footer', array( tribe( 'tec.iCal' ), 'maybe_add_link' ) );
}
}
add_action( 'init', 'tribe_remove_calendar_export_links' );Hope this helps.
September 14, 2017 at 3:25 pm #1349531Geoff B.
MemberGood evening Del,
First off, I am very sorry to hear that your server crashed. Yikes!
It sounds like you might be using WordPress built-in text-editor to edit your theme files.I would highly recommend using FTP access with a text editor software instead. That makes it easy to undo any change you might make.
As an alternative, you can even use the file manager from your CPanel.
PHP Fatal error: Cannot redeclare class Tribe__Events__Remove__Export__Links in /nas/content/live/cliftonclub/wp-content/themes/x-child/functions.php on line 116
What this message is saying is that you already have another piece of competing code (either in functions.php itself or from having the remove links plugin activated).
Either way, you will need to get rid of that code before you can implement the one I sent you.
To find out where the competing code is and remove it, simply do a search with the following string in your functions.php file Tribe__Events__Remove__Export__LinksYou will need to remove the complete existing function declaration for this to work.
Once no competing code is in place, you can safely paste the one I suggested to you.If you are unsure, could you please send me a copy of the latest version of your WordPress theme / child theme via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.
Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates or customizations you might have made.Let me know how that goes.
Best regards,
Geoff B.October 6, 2017 at 9:36 am #1360437Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Removing Export Links Plugin’ is closed to new replies.
