I have a lightbox that is the user login. When they submit a form it checks if the user is logged in if not it needs to show the lightbox to let the user log in.
How can i do this out of the javascript.
This is the html code that makes the lightbox appear when the link is clicked.
<a href="#" class="popup-login">Login</a>
This is the javascipt i have so far, the else being when the user is not logged in. This is where i want the lightbox to show.
function islogin(){
if(is_user_logged_in()){
add_file_post();
}else{
}
}
Open login/registration via modal
UserPro has built-in support for modal or lightbox view which you can use to display any of its shortcode, just like standard shortcodes.
How to display the login form via modal or lightbox?
You need a menu item or a custom HTML link that has this class: popup-login That's it. An example should be:
<a href="#" class="popup-login">Login</a>