Restricting Topics with S2Member plugin
-
WP V. 3.9.1
bbPress v 2.5.4I’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?!
- You must be logged in to reply to this topic.