0

I'm helping out a friend who runs a paid membership site, and he recently discovered that any public user can access some of the pay content by going to a particular user's Activity feed.

He's asked me to fix this for him, but I think it'll require delving into the theme code, and I'm not at all familiar with the WordPress ecosystem (I'm an experienced web programmer, but only with Python and Drupal). Is there some general kind of thing I should be looking for to figure out how to prevent this content from showing up on the creator's Activity log page?

The site is using the Iconic One Pro theme, and the Paid Memberships Pro plugin to handle the pay wall.

  • 2
    What do you mean with 'user's Activity feed'? Maybe the 'Activity' dashboard widget? IIRC that widget is available only for blog admins, not for all users... – gmazzap Mar 27 '14 at 9:40
0

Both the "Iconic One Pro" theme and the "Paid Memberships Pro" plugin appear to be commercial products and the question deeply depends on third party products, either of which should make this question off-topic. However, I think it can be generalized to a couple of options:

  1. A filter on pre_get_posts

    add_action(
      'pre_get_posts',
      function($qry) {
        if ($qry->is_feed()) {
          // your conditions go here
          // I don't know what they should be as all the code is behind a paywall
        }
      }
    );
    
  2. Filter the_content_feed

    add_filter(
      'the_content_feed',
      function($content) {
        // you can alter your content here and return modified content
        // perhaps a note saying the content is behind a paywall
        // like the code I'd need to write a decent answer
        // then return $content, modified or not
        return $content;
      }
    );
    

There are numerous questions and answers here about actions and filters, and especially about pre_get_posts. I think you are going to have to take it from there. My assumption is that the plugin you mention adds callbacks to one or more hooks to control the "paid" vs "free" content display. I would suggest you find where that happens and follow suit. It may be as simple as adding the same callback to another hook or two.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.