Disable RSS Feeds in Wordpress to Prevent Scrapers and Speed Up Performance Dramatically
Fact is, I have many sites that function as CMS "Static-style" sites. These sites don't need RSS feeds and no one reads or subscribes to these feeds.
Furthermore, I no longer care about backlinks from RSS Directories. If I do want a backlink from them, I'll create my own RSS Feed from RSSBot and upload the rss.xml file manually.
Finally, I don't feel like DMCA'ing each host to take down the content and I don't feel like dropping a backlink in the RSS feed. Most scrapers have grown advanced enough to remove anything with a "http://" prefix in the feed anyways.
So I permanently disabled my feed and comments feed by inserting the folllowing code at the very end of my functions.php file.
function fb_disable_feed() { wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') ); } add_action('do_feed', 'fb_disable_feed', 1); add_action('do_feed_rdf', 'fb_disable_feed', 1); add_action('do_feed_rss', 'fb_disable_feed', 1); add_action('do_feed_rss2', 'fb_disable_feed', 1); add_action('do_feed_atom', 'fb_disable_feed', 1); function remove_comments_rss( $for_comments ) { return; } add_filter('post_comments_feed_link','remove_comments_rss');
Note, when inserting the code above, keep a close eye on the last line in the functions.php file. If you see a ?>, then insert the code BEFORE the ?>. If there isn't a ?>, go ahead and paste at the very end.
As always, save a backup of the functions.php file just in case.
nothing to see here.
Let Us Help You Develop Your Writing Skills!
Submit Guest Posts With [ TheBitBot.Com ]
Bare Murkage.........
http://odihost.com/convert-html-to-wordpress/, start from $399
Bare Murkage.........
:)
:)