Add code snippet to functions.php
Hi, I am using The Events Calendar plugin with Clean Education theme. Unfortunately the plugin generates a lot of unwanted URLs. It was suggested by their support forum that code snippet can be added to the functions.php. The code snippet they suggested is as below. Can you please advise where should I add the code snippet to the Clean Education functions.php? Thank you.
<?php
/**
* Removes link to a recurring event's RSS feed from the <head>
*/
function tribe_remove_recurring_feed() {
if ( tribe_is_recurring_event() ) {
remove_action( 'wp_head', 'feed_links_extra', 3 );
}
}
add_action( 'template_redirect', 'tribe_remove_recurring_feed' );
The Events Calendar support forums thread:
https://theeventscalendar.com/support/forums/topic/spurious-urls-being-generated-creating-not-found-google-crawl-errors/