Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Custom Login Page in BuddyPress

@somdefabrica

Participant

@sbrajesh I have a facebook login.

When login with facebook it redirects back to the wp-login.

I use this code in my bp-custom.php

<?php

// **** Privacy ********
function restrict_access(){
global $bp, $bp_unfiltered_uri;

// If user is not logged in and
if (!is_user_logged_in() &&

(
// The current page is not register or activation
!bp_is_register_page() &&
!bp_is_activation_page()

)

) {
// Redirect to registration page. Change /join to your register page slug
bp_core_redirect( get_option('home') . '/wp-login.php' );
}
}

add_action( 'wp', 'restrict_access', 3 );

What Should I do to login with facebook work 100% ?

Thanks!

Skip to toolbar