I’m considering building a modal login page for my wordpress blog. I have a static link on my menu linking to custom /login page. Else, I have a redirect from private pages, where user needs to be logged in to proceed:
if ( !is_user_logged_in()) {
wp_redirect( '/login/' );
}
Any ideas how I can build this modal to popup whenever a user is not logged? And if he refuses to log or register to be redirect to home page for example?