my idea is, whenever someone visit my website he should be login or register to my website , I make custom login page and I redirect all page to that login page with the below code
function admin_redirect() {
if ( !is_user_logged_in()) {
wp_redirect( home_url('/onboarding/') );
exit;
}
}
add_action('get_header', 'admin_redirect');
can someone help to regirect all page to login page instead of registration page so people also can register to my website , this is my website link https://wesh.site/en/
or give me code to strict user to login or register first , please with custom page