Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: AJAX Login and Redirection #160871
     geo7thqueen
    Participant

    Okay. So I’ve got it on page load instead. Cleaner that way.

    To my single-customposttype.php code (only page type I want this particular invoking of the overlay as a modal), I have added something like the following:

    COPY CODE
     $(window).load(function(){
    		$.magnificPopup.open({
    			items: {
    				src: '#kleo-login-modal',
    				type: 'inline',
    				focus: '#username'
    			},
    			modal: true,
    			preloader: false,
    			mainClass: 'kleo-mfp-zoom'
    		});
    	}); 

    In conjunction with the
    (! is_user_logged_in() )

    Seems to work just fine.

    Few notes for anyone else that comes across this question:
    1. I don’t have to test for the #show-login already present.
    2. the line modal: true is what converts the overlay into a true modal that shouldn’t be able to dismissed. Don’t have to mess with the popup beyond that.

    Abe – Thanks for all of your help!!

Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?