12-06-2014, 07:54 AM
|
|
Too lazy to set a koala
Industry Role:
Join Date: Jan 2007
Location: CZ/EU forever!
Posts: 16,139
|
Quote:
Originally Posted by Venum
Put this code inside your theme functions.php file to disable feeds:
PHP Code:
function gfy_disable_feed() {
wp_die( __('No feed available, please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}
add_action('do_feed', 'gfy_disable_feed', 1);
add_action('do_feed_rdf', 'gfy_disable_feed', 1);
add_action('do_feed_rss', 'gfy_disable_feed', 1);
add_action('do_feed_rss2', 'gfy_disable_feed', 1);
add_action('do_feed_atom', 'gfy_disable_feed', 1);
add_action('do_feed_rss2_comments', 'gfy_disable_feed', 1);
add_action('do_feed_atom_comments', 'gfy_disable_feed', 1);
You can change this text to what ever you want, "No feed available, please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!"
Example, "No feed available wanker, go to suck your daddy's dick!"
|
or "No feed available wanker, go to suck your mother's dick!"
|
|
|