This topic contains 7 replies, has 2 voices. Last updated by Fitted Web Design 4 years, 7 months ago.
Topic Author | Topic |
---|---|
Posted: Monday May 21st, 2012 at 9:13 pm #14123 | |
I know you aren’t here to give support for bbPress, but this is more about how to selectively detach s2member’s security filters within the loop (I think). Plus, it looks like you’re using bbPress on this site so I thought you might have some insight. Typically on my site, I only want people to see what they have permissions to view. For example, in a wordpress category view, posts don’t appear in the list unless the user can access it. That’s fine. However, in the bbPress forums listings (single-forum.php), I *do* want all forums to appear, regardless of actual access permissions. Then, have it display a little locked icon next to forums that they don’t have access to. If they click into a secure forum, it would redirect to the s2member options page as normal for pages they can’t access. What it comes down to, I think, is to detach s2member’s filters for that specific forum list view, then reattach them for everything else. I’m not exactly sure where to even do this inside the bbPress templates, but maybe if you can point me in the right direction of how to do it for a standard WP category view, then I can figure it out for bbPress. I tried using the approach
But I think, maybe, since bbPress uses get_posts, that approach doesn’t really work? I tried it before the
line in the single-forums.php template, but it was pulling other posts from elsewhere in the site rather than the forums. Maybe I don’t know how to use query_posts to get the bbPress forums? I also tried unchecking the box for Alternate View Protection box for “Filter ALL WordPress® queries; protecting all Alternative Views.” which worked, but also left almost all of my secure content elsewhere on the site open to the public. Maybe there’s a way to choose precisely what alternate views are/are not being protected and I could apply that to the bbPress forum listing view? Hoping you have some insight. (Sorry for the tl;dr style post. I tried to include all of the information you might want. Thanks!) Kenny |