Home › Forums › Calendar Products › Events Calendar PRO › disable Export listing from the front page
- This topic has 7 replies, 2 voices, and was last updated 9 years, 3 months ago by Barry.
-
AuthorPosts
-
January 20, 2015 at 1:00 pm #935349screenrageParticipant
How do I disable the Export Listed Events button which shows up at the bottom of the List View? I don’t want people to come in, grab the export of all events and not come back to the site for a month.
I would like to completely disable that functionality not just simply remove the button.
thanks
January 20, 2015 at 1:08 pm #935355screenrageParticipantplease help!
January 20, 2015 at 3:15 pm #935407BarryMemberHi screenrage,
To only remove that link from list view, you could use a snippet like this one (you might add it to your theme’s functions.php file, for instance):
add_filter( 'tribe_events_list_show_ical_link', 'list_view_remove_ical_link' ); function list_view_remove_ical_link( $show_remove ) { if ( tribe_is_list_view() ) return false; return $show_remove; }
To remove it from all views you could do this instead:
add_filter( 'tribe_events_list_show_ical_link', '__return_false' );
I would like to completely disable that functionality not just simply remove the button.
To actually prevent an iCal feed from being supplied even if a user somehow crafts the correct URL manually, you could also add a snippet like this one:
if ( did_action( 'plugins_loaded' ) ) remove_ical_functionality(); else add_action( 'plugins_loaded', 'remove_ical_functionality', 200 ); function remove_ical_functionality() { remove_action( 'tribe_tec_template_chooser', array( 'TribeiCal', 'do_ical_template' ) ); }
Does that help?
January 21, 2015 at 5:50 am #935601screenrageParticipantYes it does! Thank you so much Barry!
January 21, 2015 at 7:06 am #935632screenrageParticipantthe last snippet to completely disable it, would that also go in functions.php?
January 21, 2015 at 8:38 am #935728BarryMemberYes – you could add it to your theme’s functions.php file 🙂
January 21, 2015 at 3:18 pm #935928screenrageParticipantthanks!
January 21, 2015 at 3:45 pm #935941BarryMemberNo problem.
I’ll go ahead and close this topic, but if we can help with anything else please do feel free to create new topics as needed.
Thanks again!
-
AuthorPosts
- The topic ‘disable Export listing from the front page’ is closed to new replies.