0

I have a Wordpress powered site and I would like to know how to disable all category based RSS feeds with PHP or even mod-rewrite if possible.

Thanks

1

You should spend some time in the word press documentation

disable Rss

More here

| improve this answer | |
  • I didn't want to install a plugin, but instead write it myself. I actually figured it out after I posted my question. FAIL, lol. – Amir Sep 30 '11 at 23:03
0

I solved it:

   function check_the_feed() {
    if ( is_category() )
        wp_die( __('No feed available, please visit our homepage!') );
}
add_action('do_feed', 'check_the_feed', 1);
add_action('do_feed_rdf', 'check_the_feed', 1);
add_action('do_feed_rss', 'check_the_feed', 1);
add_action('do_feed_rss2', 'check_the_feed', 1);
add_action('do_feed_atom', 'check_the_feed', 1);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy