I assume your theme already has a ‘feed-rss.php’ (if not, here’s how they work: http://codex.wordpress.org/Customizing_Feeds)
You’ll need to pass a few parameters to the query before you loop through them.
//Get all posts that are private or public
$the_query = new WP_Query( array( 'post_status' => array( 'private', 'publish' ) );
while ( $the_query->have_posts() ) {
//do stuff
}
For more parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters
Related Posts:
- Let private posts stay in status “private” after edit through “editors”
- RSS for Pages Instead of Posts?
- Show ‘Read more’ in rss feed
- Planned private posts get published immediately
- Post update RSS notification plugin
- What differences are there between a Privately Published post and a Draft post?
- Private Posts/Pages & Search
- Are private posts visible to search engines?
- Addition Text to Post Titles (Custom Post Types) in RSS
- Whitelist Author of Private Post
- Posts gathered from WPEMatico feeds are being mixed in different languages. Polylang is used for language separation
- Show certain posts in a LIST format that members have been granted access to
- filter RSS feed in URL
- Post visibility based on user role
- date issue with category post retrival
- Cannot retrieve a custom RSS field from posts
- Automatically Import WordPress Blog to Facebook Page [closed]
- Remove password protected posts from default RSS feed
- Manage Private Posts
- Image on rss feed on post
- How can my plugin display a populated new post window
- Problem with articles feed: XML Parsing Error: XML or text declaration not at start of entity
- fetching posts and showing on frontpage
- Posts and Pages w. private visibility don’t show up in existing content
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- How to preserve HTML from posts in RSS feed
- How to set a Post’s default visibility to ‘Private’ in Gutenberg?
- Filtering private Posts
- How can I have the posts from one word press blog show on the presentation page of another word press site
- How to include Related Posts in WP RSS feed
- Get image paths from RSS feeds
- How can I make my blog private? [closed]
- Making a private post visitable by link?
- What is the use of to_ping and pinged column?
- Prevent Authors from viewing each others Posts
- Removing filter dropdown in posts table (in this case Yoast SEO)
- Export WordPress Posts and Meta Information in CSV format
- How to add post count to wp_nav_menu?
- Posting From Apple Aperture?
- How to know if get_posts() failed?
- Show related posts by category but ignore one category
- Replacing all attachment links in post with media file link
- how to show all post in my page-grid.php template page
- How to add padding between posts
- eBooks download website, page or post?
- Remove whitespace at the end of posts?
- Add few specific post ids to wp_query
- Disable REST API for a user ROLE
- Add filter-by-tag in the all posts admin console page
- Can I hide a specific post from latest posts page?
- Latest 5 posts (custom post type), each post different CSS
- Add scripts on custom post add/edit pages Not Working
- Understand post type
- How can I show wordpress posts based on author?
- previewing my posts on static page?
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Avoid duplicate post from same Taxonomy
- Post revisions disappeared (for some posts)
- Replace ‘published on date’ with ‘modified on date’ on Posts
- Can I divide the pages into categories?
- Display featured products by category
- Change post order random through out the entire WordPress
- Set size for attachments
- How to render arbitrary post without displaying it [closed]
- display random posts on index.php instead of latest
- Only show a Post once in 10 visits
- Send a review notification email to admin when a post is 12 months old
- Edit custom fields in posts list
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Restore woocommerce orders
- Split post title for styling
- How to get value in radio input in post meta box?
- ACF date picker to trigger category change
- How to insert custom text after H1 to all my blog posts?
- wordpress admin missing Posts button
- SQL query: select duplicate posts – but using duplicate meta [duplicate]
- Sync All Post Type Tag
- post and page and custom post type
- How can I use query_posts to loop through posts and construct my own content?
- Permalink base only for posts
- If I moved the location of my generic “posts” page, do I need to change the slugs for all of the individual posts?
- Not display post meta if empty
- issue in wordpress auto delete post and redirect to another 1
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- Loop doesn’t display posts. It displays a link to the home page instead
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Super post cleaner, could this be category specific?
- How to organise post by category and date
- Show post if in category
- Get current post’s child page?
- retrieve post slug by post_tags taxonomy
- Show all posts in category
- Creating a new Sortable Column in WordPress Admin
- Hide the contents for specific post
- Display post structure in function
- website images getting corrupt automatically
- Posts Page in WordPress loading bare HTML of my homepage
- How to speed up WP_Posts_List_Table __construct() Query on a wordpress website with over 1 million posts?
- Adding content to the top of post’s based on their category
- initiate the post numbering for the upcoming articles at 100,000