Forums

How to protect WordPress RSS Feed correctly? (4 posts)

  1. Investoretire
    Member
    Posted 10 months ago #

    Hi

    I was researching my RSS feed on my wordpress site, when I suddenly realised that all my protected posts were being broadcasted on my RSS feed! Why aren't they being protected?

    http://www.dividend-income-investor.com/feed/

    Also category protection does not seem to work, even though I have set protection.

    Appreciate any help to correct this.

    Thanks

    Steven Dotsch
    Managing editor
    http://www.dividend-income-investor.com

  2. MrsCassandra
    Member
    Posted 10 months ago #

    You can add the following code at the end of your functions.php file in the themes folder:

    /* REMOVE FEEDS */
    add_action('do_feed', 'fb_disable_feed', 1);
    add_action('do_feed_rdf', 'fb_disable_feed', 1);
    add_action('do_feed_rss', 'fb_disable_feed', 1);
    add_action('do_feed_rss2', 'fb_disable_feed', 1);
    add_action('do_feed_atom', 'fb_disable_feed', 1);

    function fb_disable_feed() {
    wp_die( __('No feed available, please visit our homepage!') );
    }

  3. Investoretire
    Member
    Posted 10 months ago #

    Thank you for this, but is there a way to disable the feeds I specify, e.g. categories?

  4. MrsCassandra
    Member
    Posted 10 months ago #

    Try and have a look here http://seoperth.net.au/remove-specific-category-posts-wordpress-rss-feed/

    I did not read it all or try it, but is worth to have a look :)

Reply

You must log in to post.

About this Topic