WordPress.org

Ready to get started?Download WordPress

Ideas

Add constants DISABLE_FEED for fine tuning a blog.

  1. @wikicms
    Member

    12345

    For example:
    I do blog in the style of classic cms, and I do not need a feed (RSS).
    To turn it off I have to learn a lot of articles. Why? Please add -
    define('WP_ENABLE_FEED', false);
    This constant disable the feed on my blog. Thank you!

    Posted: 2 years ago #
  2. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Put these lines in your function.php:

    function mysite_kill_rss() {
    		wp_die( __('No feeds available, please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
    	}
    
    	add_action('do_feed', 'mysite_kill_rss', 1);
    	add_action('do_feed_rdf', 'mysite_kill_rss', 1);
    	add_action('do_feed_rss', 'mysite_kill_rss', 1);
    	add_action('do_feed_rss2', 'mysite_kill_rss', 1);
    	add_action('do_feed_atom', 'mysite_kill_rss', 1);
    	}

    This stops all feeds.

    Posted: 2 years ago #
  3. @wikicms
    Member

    12345

    Thanks Ipstenu! Yes, this code works.

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    1 Vote
  • Status

    This is plugin territory

Tags