@benofinil
3 years, 1 month ago
I really need someone’s help, I think the solution is quite easy, but I don’t know to code php…
I found this code and it works perfectly ! Hope it will help some of you…
function kleo_page_template_redirect() { //if not logged in and on a bp page except registration or activation if( ! is_user_logged_in() && ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) { wp_redirect( home_url( ‘/login/’ ) ); exit(); } } add_action( ‘template_redirect’, ‘kleo_page_template_redirect’ );