• Resolved pokieo

    (@pokieo)


    I was wondering if there was a way to unblock access to the member RSS feed. I’ve built an app that accesses the RSS feed of the blog, but would like to restrict access to that content on the wordpress site. Basically I want the app to have unrestricted access to the feed, while other people need to have a membership.

    Thanks!

    https://wordpress.org/plugins/paid-memberships-pro/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kim Coleman

    (@kimannwall)

    The RSS feed is filtered here: https://github.com/strangerstudios/paid-memberships-pro/blob/6003b88ed2f7a4171e84dbc904e260cd4a3addc3/includes/content.php#L333. You should be able to write a custom function to disable that filter.

    Note that this unlocks it for everyone – which isn’t desirable. Or you could get posts via the WordPress API instead: http://wp-api.org/#posts_retrieve-posts

    I too want the ability to allow SUMMARY RSS feed for protected content, as a teaser of sorts. Looked at content.php and tried a couple of things but I could not get RSS feed to work for protected content. Also, according to WordPress docs… “the_content_rss
    applied to the post content prior to including in an RSS feed. This filter hasn’t been functional since 2.7.

    So, I looked at places in the code where is_feed() was being checked and tried to brute force enable RSS content, but no luck. I also tried enabling the show excepts feature of the plugin, but still no RSS feed for protected content.

    I’m sure I’m missing something easy. Any more clues you can offer will be greatly appreciated. Thank you.

    Figured out what was still blocking the RSS feed even though I disabled the filter…

    $filterqueries = pmpro_getOption("filterqueries");
    if (!empty($filterqueries))
        add_filter('pre_get_posts', 'pmpro_search_filter');

    Solution is to either not filter queries (advanced settings tab) or to add conditional code for feeds in the pmpro_search_filter() function, which I did.

    Plugin Author Jason Coleman

    (@strangerstudios)

    Glad you got that working. Also of interest to people who might stumble upon this is our Member RSS add on which gives users an RSS Feed URL with a key attached that disables the PMPro RSS filters:

    http://www.paidmembershipspro.com/add-ons/plus-add-ons/pmpro-member-rss/

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Allow RSS Feed access’ is closed to new replies.