Hello,
How can I redirect this code to the wordpress login page.
/** * Hide Members Directory and single members page from non members(not logged in users) */ function buddydev_hide_members_directory_for_non_members() { if ( bp_is_members_directory() || bp_is_user() ) { if (!is_user_logged_in() ) { bp_core_redirect( bp_get_signup_page() ); } } } add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_for_non_members' );
Thanks
Please change
bp_get_signup_page()
towp_login_url()
Regards
Brajesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
This topic is: not resolved