Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Oct 1 '11 at 4:38

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You should spend some time in the word press documentation

disable Rss

More here

share|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

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);
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.