how to redirect from home page to custom link if not logged in in wordpress
add_action( 'admin_init', 'redirect_if_user_not_logged_in' );
function redirect_if_user_not_logged_in() {
if ( !is_user_logged_in() && is_page('slug') ) {
wp_redirect( 'http://your-redirect-page-here ');
exit;
}
}