I feel so bad, you have a few threads on here that I have the same response (almost). This is a do-able feature that I could probably squeeze in a closer release (probably 2.1), but I have no expected date on that at the moment as my availability is a little slim to get a good amounts of work in.
Again, if you got the skills, you’re welcome to modify the code into your own creation.
Glad I found this. Not sure if it’s planned in the future release, but this would be great. From a logistical point, the auto pop-up would probably need to depend on user session, etc.. That functionality seems to be the current trend on the web these days — especially when membership conversion is so valuable.
Awesome, awesome work on the plug-in to this point. So much value here. I hope to be able to use it sooner than later!
Found a quick and dirty way to do this.
I load just a small part of the wp-modal-plugin along with an extra line in my global js file:
jQuery(document).ready(function($) {
// Load the modal window
$('a.login-window').click(function() {
// Get the value in the href of our button.
var login_id = $(this).attr('href');
// Add our overlay to the body and fade it in.
$('body').append('<div id="overlay"></div>');
$('#overlay').fadeIn(300);
// Fade in the modal window.
$(login_id).fadeIn(300);
// center our modal window with the browsers.
var margin_left = ($(login_id).width() + 24) / 2;
var margin_top = ($(login_id).height() + 24) / 2;
$(login_id).css({
'margin-left' : -margin_left,
'margin-top' : -margin_top
});
return false;
});
// this line added to trigger the popup on page load
$('a.login-window').click();
});
Popup will only happen if the shortcode is on the current page.
@chazy, I couldn’t really implement the solution. Could you please be more specific with the instruction please?
I did add this one line of code you sent within the wp-modal-login.js file. But the pop-up doesn’t auto-happen on the page with the shortcode as it’s supposed to. 🙁
Thanks.
Hi emminnn,
To be more precise, you have to create a new .js file which you will load separately. This new file will have the code content of my message above.
Hope that’s clearer!