Here’s the filter to exclude password protected posts from the default RSS feed:
function rss_filter_protected( $query ) {
if ( $query->is_feed ) {
$query->set( 'has_password', false );
}
return $query;
}
add_filter( 'pre_get_posts','rss_filter_protected' );
Related Posts:
- How to protect pages with double authentication: password + email (in custom field)
- How can I safely increase the character limit for post passwords?
- Is it possible to direct users to a certain post based on a password entered on the home page?
- Hide password protected posts in admin
- RSS for Pages Instead of Posts?
- How to lock a post or page
- Show ‘Read more’ in rss feed
- Post update RSS notification plugin
- Locked/Unlocked in title
- Addition Text to Post Titles (Custom Post Types) in RSS
- How to verify wp user password by sql query in wp? [closed]
- Posts gathered from WPEMatico feeds are being mixed in different languages. Polylang is used for language separation
- filter RSS feed in URL
- date issue with category post retrival
- Cannot retrieve a custom RSS field from posts
- Automatically Import WordPress Blog to Facebook Page [closed]
- Display password protected posts to logged in users
- Change the color of the Password Protected Post titles
- Image on rss feed on post
- How can my plugin display a populated new post window
- How can I create an RSS feed that includes “Private” posts?
- Problem with articles feed: XML Parsing Error: XML or text declaration not at start of entity
- fetching posts and showing on frontpage
- 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 do I check if a post is password protected?
- Using WP page password protection as defacto login
- 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
- Password-protected Posts lead to 404 Error
- How do I check if I linked to a post before I delete it?
- disable password protected page for logged users
- How do I use inline SVG in WordPress
- “Uncaught SyntaxError: Unexpected token
- Pull posts from another wordpress install on same server
- How can I get all posts data from within a paginated search result?
- Syndicated Posts when Updated Lose HTML tags
- How to insert current date/time in the content of a post?
- I want to query posts in monthly basis
- White Blank Page when Updating and Publishing Page/Post
- Full Width Main Post
- Posts vs. Pages
- Limiting the number of posts in WP_Query leads to unexpected result
- Plain permalinks not working!
- Guest Author – How to display posts on /author/ archive page
- How can I find out what items a user has purchased? [closed]
- Nothing Found error when creating new posts – how to correct this?
- Redirection not working in this front end post submission form?
- Display multiple custom taxonomy values on single custom post types page?
- Underscores Theme Unit Testing – Catching Untitled Posts
- Encountering “Wrong nonce. Action prohibitied.” when trying to alter User Role and unable to Post via WP Admin
- Pulling in post category and children within category
- Is Hfeed class for all pages needed
- get post content of particular post by url
- get query() without post content?
- Issue where WP Featured Image will not display
- Custom order for Mysql array
- posts_per_page option limits the number of Gallery items
- Single.php – Get Current Parent Category
- insert a warning message into post-new.php
- SQL Command for restoring trashed comments
- Linking to pages/posts within the site
- Loop don’t work within single.php page
- Importing posts only – consequences?
- Add Post As a menu Item
- WordPress.com post editor replacement
- WordPress Menu options in the Admin: Posts for the dropdowns
- What is $post->pre_post_content exactly?
- How can I add 2 buttons with shortcode
- Display Related Posts by Category in Random
- Showing posts for today and future
- Display 3 posts with different HTML markup using a loop
- Jumbled writing under a post
- Moved to a new server, backup was a day old and missing 3 posts, anyway to recover them from old host?
- Hook save_post_cpt not triggered when custom fields are modified
- Set Default Post as Parent Child (Nested) Relation
- Get category slug of the Parent category of a Product
- How to automate creating pages on a hosted wordpress from a local set of folders?
- How to limit wordpress the_excerpt() dynamically
- Contact Form 7 Shortcode not recognized inside another shortcode
- WordPress Pods Custom Post Type – separate Media Upload folder for each custom Post Types
- WP posts using index.php instead of single.php
- Display simple html code in post
- How to display particular set of wordpress post on a webpage?
- Excluding tag Link from html tags in Post content
- Allow users to post their videos to my wordpress website?
- Add in the url attachment loop the wp_link_pages of the post
- Couldn’t view individual post that were in my website
- Add Categories To Custom Post
- Get the category of post
- Display Posts by Categories
- Edit Posts Page but not category specific pages?
- Problem with jQuery in post body?
- Custom template for different post types
- Pagination working locally but not on live site
- prevent same wordpress post title
- How can to use the players from the Media Widgets in the body of a post to play audio and video files
- How can I display these posts in ascending order?
- Is there any point to using wp_unique_post_slug?