Created
July 31, 2015 22:05
-
-
Save chuckreynolds/094d750a78afa11dcb40 to your computer and use it in GitHub Desktop.
wordpress remove comments feed from RSS feeds list
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 | |
function remove_comment_feeds( $for_comments ){ | |
if( $for_comments ){ | |
remove_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 ); | |
remove_action( 'do_feed_atom', 'do_feed_atom', 10, 1 ); | |
} | |
} | |
add_action( 'do_feed_rss2', 'remove_comment_feeds', 9, 1 ); | |
add_action( 'do_feed_atom', 'remove_comment_feeds', 9, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment