Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Last active June 4, 2020 20:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrasguseo/3b9c6c6480b0cb53b8d3ea18b464d5cf to your computer and use it in GitHub Desktop.
Save andrasguseo/3b9c6c6480b0cb53b8d3ea18b464d5cf to your computer and use it in GitHub Desktop.
Remove feed code
<?php
/* Barry's version */
/* Remove feeds from all pages */
function remove_single_event_feed_links() {
if ( ! class_exists( 'Tribe__Events__Main' ) ) {
return;
}
// Add / Uncomment these lines if you only want them removed on the single event pages.
// if ( ! is_singular( Tribe__Events__Main::POSTTYPE ) ) {
// return;
// }
remove_theme_support( 'automatic-feed-links' );
// Add / Uncomment this line to re-enable support for just Posts
// add_theme_support( 'automatic-feed-links', array( 'post' ) );
}
add_action( 'after_setup_theme', 'remove_single_event_feed_links', 11 );
//Removes the remaining comment feed from single events page
remove_action( 'wp_head', 'feed_links_extra', 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment