WordPress.org

Ready to get started?Download WordPress

Forums

RSS showing private posts (2 posts)

  1. frank1240
    Member
    Posted 5 years ago #

    Well, I think it's not desired if anyone set it to private but at the end , the posts can be viewed by others using RSS reader openly.
    Some minor fixes in a few feed maker may protect it already.
    wp-includes/feed-rss.php
    wp-includes/feed-rss2.php
    wp-includes/feed-atom.php
    wp-includes/feed-rdf.php

    Or is it a wanted feature by others?

  2. mothmenace
    Member
    Posted 5 years ago #

    Yes this is a real problem, a glaring error infact? and still unfixed in 2.8.1?

    Rather than editing wp-includes, it's possible to fix like this in functions.php:

    function rss_no_private($q)
    {
    if(is_feed())
    {
    $q = str_replace("OR wp_posts.post_status = 'private'",'',$q);
    }

    return $q;
    }

    add_filter("posts_where", "rss_no_private");

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.