Wordpress Logo

Disable RSS

function knaeckebrot_disable_feed() {
 wp_die( __( 'No feed available, please visit the <a href="'. esc_url( home_url( '/' ) ) .'">homepage</a>!' ) );
}

add_action('do_feed', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_rdf', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_rss', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_rss2', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_atom', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_rss2_comments', 'knaeckebrot_disable_feed', 1);
add_action('do_feed_atom_comments', 'knaeckebrot_disable_feed', 1);
// Links aus head entfernen
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );

Quelle: https://kinsta.com/de/wissensdatenbank/wordpress-disable-rss-feed/