Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created July 31, 2015 22:05
Show Gist options
  • Save chuckreynolds/094d750a78afa11dcb40 to your computer and use it in GitHub Desktop.
Save chuckreynolds/094d750a78afa11dcb40 to your computer and use it in GitHub Desktop.
wordpress remove comments feed from RSS feeds list
<?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