Bruce – You say that “Custom Capabilities are not able to protect entire Categories.” Can you help me understand what you mean by that. I watched the Custom Capabilities videos and it sounds like it will protect a category as I need.
To explain a little further. All Insights level entries are posted with the Insights category. I then require s2member level 1 or higher to view that category.
Compete level entries will have two categories, “Compete” and the name of the competitors, say “Oracle”. I require s2member level 2 or higher to view the Compete category, then want to use custom capabilities to block only certain site members from seeing “Oracle”.
My desired behavior is that when they are active at s2member level 2 they can see all content flagged with the Compete category except posts that are also in the Oracle category. When their s2member level 2 membership expires, they get blocked from everything with the Compete category, and the custom capabilities become irrelevant since the “Compete” tag was also on every one of those posts.
This is new to me, so I’m hoping someone provide guidance, or the lines of code
OPTION A – block categories for specific site members
If the current user is s2member level 2 AND has custom capability Oracle, then prevent them from seeing items in the Oracle category.
OTION B – instead of blocking one competitor category, grant access to all of the others
Maybe I need to have “Oracle” and all of the other competitor categories available to s2member level 3. If someone sells none of the competitive products, I just give them access to level 3 and they can see all of them. If they sell one or more of them of the competitor products, I give them access to level 2, then use custom capabilities to grant them access to the competitor categories for products they don’t sell.
I understand the concept of how I want it to work….just have no idea how to put together the code that I need to add into wordpress, so I’m looking for a sample code snippet that either grants access to, or blocks access from a specific category.