Title: Multiple Subscriptions / Exclude category
Last modified: June 10, 2020

---

# Multiple Subscriptions / Exclude category

 *  [wpblogwriter](https://wordpress.org/support/users/wpblogwriter/)
 * (@wpblogwriter)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/)
 * Hello,
    I have now added the multiple subscription add-on and I was expecting
   to be able to configure easily the different subscriptions. – Free subscription:
   see all posts but not from category premium – Premium subscription: see all posts(
   including premium category posts)
 * This seems not to be possible. It looks like I have to add all categories I want
   into the free subscription and omit the premium category. This is really painfull
   as there are 50 categories and regularly new ones are added..
 * An other option would be to create a new post type, but this demands also other
   changes on the theme which lead into a custom development..
 * Any other way I may have not seen/understood correctly?
 * Thank you for some advice..
    WBW

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

 *  Thread Starter [wpblogwriter](https://wordpress.org/support/users/wpblogwriter/)
 * (@wpblogwriter)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-12964752)
 * Addition: by the way, doing the way I described, by adding all categories which
   are allowed in the free subscription (except the one for the premium) leads to
   a long list of “Unlimited Posts, Unlimited Posts, …” on the register page in 
   the Content access bullet point.. it doesn’t show the selected taxonomy. It requires
   to overwrite the default content access description.
 *  Plugin Contributor [Jeremy Green](https://wordpress.org/support/users/endocreative/)
 * (@endocreative)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-12966774)
 * Hello. We are working on an update to Leaky Paywall that will allow you to add
   exceptions to Access Rules. That will help with the configuration of the use 
   case you described.
 *  Thread Starter [wpblogwriter](https://wordpress.org/support/users/wpblogwriter/)
 * (@wpblogwriter)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-12966813)
 * Sounds good! Hopefully soon 🙂
 *  Thread Starter [wpblogwriter](https://wordpress.org/support/users/wpblogwriter/)
 * (@wpblogwriter)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-13020441)
 * Hi Jeremy,
    Just an example to explain that the current permission rules are 
   give us some trouble.
 * – Free subscriber has access to categories A-Y
    – Paid subscribers, to category
   Z
 * My customer now selected to a post the categories A, B and Z and was wondering
   why all subscribers could see the post content…
 * It would be very important to have a negated category..
    -> free subscribers 
   hava access to all categories and ! Z (This should solve the problem)
 * Best regards,
    WBW
 *  [mbrowne](https://wordpress.org/support/users/mbrowne/)
 * (@mbrowne)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-13031705)
 * I encountered the same issue. Here’s a workaround I came up with in the meantime:
 *     ```
           add_filter('leaky_paywall_current_user_can_access', function($can_access) {
               if (!$can_access) {
                   return false;
               }
               // *** Replace these with the real values for your site ***
               $PREMIUM_SUBSCRIPTION_LEVEL_ID = 1;
               $PREMIUM_SUBSCRIPTION_TAXONOMY_IDS = [5, 6];
   
               $settings = get_leaky_paywall_settings();
               $restrictions = new Leaky_Paywall_Restrictions();
               $level_ids = leaky_paywall_subscriber_current_level_ids();
   
               // Don't allow access to the premium taxonomies unless the user has
               // a premium subscription
               if (! in_array($PREMIUM_SUBSCRIPTION_LEVEL_ID, $level_ids) ) {
                   foreach ($PREMIUM_SUBSCRIPTION_TAXONOMY_IDS as $id) {
                       if ($restrictions->content_taxonomy_matches($id)) {
                           return false;
                       }
                   }            
                   return $can_access;
               }
           });
       ```
   
 *  [mbrowne](https://wordpress.org/support/users/mbrowne/)
 * (@mbrowne)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-13055614)
 * There was a mistake in what I posted above. The bottom part of the code should
   be as follows ($can_access after the `if` block).
 *     ```
               // Don't allow access to the premium taxonomies unless the user has
               // a premium subscription
               if (! in_array($PREMIUM_SUBSCRIPTION_LEVEL_ID, $level_ids) ) {
                   foreach ($PREMIUM_SUBSCRIPTION_TAXONOMY_IDS as $id) {
                       if ($restrictions->content_taxonomy_matches($id)) {
                           return false;
                       }
                   }            
               }
               return $can_access;
       ```
   

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

The topic ‘Multiple Subscriptions / Exclude category’ is closed to new replies.

 * ![](https://ps.w.org/leaky-paywall/assets/icon-256x256.png?rev=2910355)
 * [Leaky Paywall](https://wordpress.org/plugins/leaky-paywall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaky-paywall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaky-paywall/)
 * [Active Topics](https://wordpress.org/support/plugin/leaky-paywall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaky-paywall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaky-paywall/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [mbrowne](https://wordpress.org/support/users/mbrowne/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/multiple-subscriptions-exclude-category/#post-13055614)
 * Status: not resolved