As first mentioned since 4.4 you can use the feed_links_show_comments_feed
filter.
Example (in your theme functions.php file) :
add_action( ‘after_setup_theme’, ‘head_cleanup’ );
function head_cleanup(){
// Add default posts and comments RSS feed links to head.
add_theme_support( ‘automatic-feed-links’ );// disable comments feed
add_filter( ‘feed_links_show_comments_feed’, ‘__return_false’ );}
or you can set in general-template.php to false
if ( apply_filters( ‘feed_links_show_comments_feed’, false ) ) {
printf(
‘<link rel=”alternate” type=”%s” title=”%s” href=”%s” />’ . “\n”,
feed_content_type(),
esc_attr( sprintf( $args[’comstitle’], get_bloginfo( ‘name’ ), $args[’separator’] ) ),
esc_url( get_feed_link( ‘comments_’ . get_default_feed() ) )
);
}
Disable RSS Feed with Plugin
Another way to disable a WordPress RSS feed is to use a free plugin like Disable Everything. This plugin disables all RSS/Atom feeds and feed links on your WordPress website by redirecting all the requests.
You can download Disable Everything from the WordPress repository or by searching for it within your WordPress dashboard under “Add New” plugins. Once the plugin has been installed and activated, simply head over to the Disable Everything “settings” area and check the checkbox to disable all RSS feeds and feed links.