Last active
June 4, 2020 20:25
-
-
Save andrasguseo/3b9c6c6480b0cb53b8d3ea18b464d5cf to your computer and use it in GitHub Desktop.
Remove feed code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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