Home / RSS Feeds / Disable RSS – Feed
Duplicate Snippet

Embed Snippet on Your Site

Disable RSS – Feed

Disable RSS - Feed

<10
Code Preview
php
<?php
function remove_feeds() { wp_die( __( 'Feeds Disabled' ) ); }
 
add_action('do_feed', 'remove_feeds', 1);
add_action('do_feed_rdf', 'remove_feeds', 1);
add_action('do_feed_rss', 'remove_feeds', 1);
add_action('do_feed_rss2', 'remove_feeds', 1);
add_action('do_feed_atom', 'remove_feeds', 1);
add_action('do_feed_rss2_comments', 'remove_feeds', 1);
add_action('do_feed_atom_comments', 'remove_feeds', 1);
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );

Comments

Add a Comment