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.