That setting is meant to prevent an unapproved logged-in users from accessing any BuddyPress page except his own BP profile until they are approved. Non-logged in users would get redirected to the homepage.
t sounds like it’s possible that you have a BuddyPress page of some sort set to be your homepage perhaps? I know we have filters that can be used to set a custom location to redirect visitors to if you want to try that out.
Will wait on confirmation about the homepage setup first though, before diving too far down potential solutions.
I set as Home Page the member directory page (I am testing for the moment) so according to your explanations it created an infinite loop.
I changed home page and activate the option again now it works.
When I am not logged in and try to go to member directory I am redirected to Home page.
Thanks for your answer
Regards
Johan
Yeah, that’d do it. A case of “oh, this is buddypress, i should redirect to the homepage. oh this is buddypress, i should redirect to the home…” you get the idea.
Welcome.
@tw2113
«I know we have filters that can be used to set a custom location to redirect visitors to…»
Please provide code to do that (OR include a field in backend setting of your next version for a custom URL)…
I’m using the BP Group Map plugin by Philopress and in the shortcode map they create are a lot of links to BP Groups. I would like to redirect to a page with info about co-operation. That would be really helpful.
Thanks, Hans
For info sake:
/**
* Filters the URL to redirect to for logged out users.
*
* @since 4.3.0
*
* @param string $value URL to redirect to.
*/
$logged_out_url = apply_filters( 'bprwg_logged_out_redirect_url', get_bloginfo( 'url' ) );
To utilize:
function my_custom_logged_out_redirect( $original_url ) {
return 'https://mozilla.org';
}
add_filter( 'bprwg_logged_out_redirect_url', 'my_custom_logged_out_redirect' );
Used at https://github.com/WebDevStudios/BuddyPress-Registration-Options/blob/4.3.7/includes/core.php#L396-L415
This quick example would send people to Mozilla’s website if the user is logged out. You can add extra logic/code as needed in that my_custom_logged_out_redirect()
function to programmatically get a URL or do whatever you need.
@tw2113
Working perfect. Thanks Michael!