Restricting Topics with S2Member
-
I’ve been banging my head against the wall on this one.
Here is what I need to do:
I have users who need to register for different forums. Each specific forum has restrictions. I am using the S2Member plugin. I can with their shortcodes restrict content within a page. I then can restrict a forum listing when I use a bbPress short code within a page.
The problem is that bbPress dynamically creates topic pages, thus I can not put any shortcode logic in to restrict who sees the topics.
S2Member has some code that works to restrict content with a function. However, using bbPress conditional tags don’t work. I can use the native conditional tags which do.
Below is my code that I can’t seem to get working:
add_action ("wp", "my_custom_capabilities"); function my_custom_capabilities () { if(bbp_is_topic_tag('Global')) { header ("Location: ".S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); exit(); } }
Ideas?!
- The topic ‘Restricting Topics with S2Member’ is closed to new replies.