Re: How to make pages like Groups, Forums, members and updates only accessible to members?
Honestly I don’t think s2member is an option for me as it seems to conflict with another one of my plugins.
Has anyone been able to resolve this yet? Pretty please?
I’ve been experimenting with some code to make into a plugin but it doesn’t seem to be working – I get lovely fatal error.
Parse error: syntax error, unexpected $end in /home/content/65/3511365/html/anthempages/wp-content/plugins/BP Privacy Redirect/bp_privacy_redirect.php on line 71
If anyone is a php guru maybe you could see what I’m doing wrong? Here’s what I have:
`<?php
function members_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/activity/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function members_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/members/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function groups_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/groups/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function forums_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/forums/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
};
?>`
If we can get this working I would be so happy to put it out there as a plugin for everyone. But could someone please help?
Thanks and best wishes,
Kristen