Restricted RSS Feed for Registered Users

Posts of a custom post type are published on our main site. I want to display an RSS feed of these posts on all subsites. The problem is that the posts are restricted to registered users. All subsite viewers are registered users, so they can view the posts on the main site. But I can't find a plugin that will display a restricted feed. Is there any way to show the feed on the subsites?

  • Burlington Avenue

    I use the Groups plugin to provide access to restricted pages/posts to registered users.

    Logged in registered users can view a feed of the restricted posts by pasting the feed URL into the browser address bar (example.com/custom-posts/feed/). But the feed will not show up through an RSS reader. Instead, only the website's public feed shows up.

    I don't want to display global posts, just restricted posts published on the main site.

  • Adam Czajczyk

    Hello Burlington Avenue!

    The way most of the reader plugins work is that they use SimplePie RSS reader script that's incorporated with WordPress. The script actually works like any "external" reader so in general it's like the site was accessing its own feed using external reader tool. Well, it's not that simple but sums up the general principle.

    I think that is the reason why those protected posts do not show up in feed: for SimplePie there's pretty much no difference whether the feed comes from your own site or from external site and the same way it wouldn't be able to access protected posts on the 3rd-party site, it's not able to access them on your own.

    I'm not quite sure whether there is a plugin that could handle that. The logged in user has a special cookie saved in his/her browser that's fetched by WordPress and only then the "for logged in users" content is served. Readers don't use that. I think the workaround would be to automatically "re-publish" titles and excerpts of these posts (the same that are in feeds) to the main site along with links or create a custom reader that would "simulate" user - would access the site, log-in and fetch feed. That would then be actually a script "external to WP" and its output could be embedded to the site.

    Both these options would require custom development, though I think the first one would be much simpler in that case. If you have additional questions, let me know. If you need somebody to develop it for you though, you may want to post a question on our "Jobs & Pros" job board (please note: no WPMU DEV staff involved!) here:

    https://premium.wpmudev.org/wordpress-development/

    Kind regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.