Skip to content

Instantly share code, notes, and snippets.

@waltermesser
Created March 6, 2017 00:55
Show Gist options
  • Save waltermesser/e049774ad858415862caaa2c360ebd05 to your computer and use it in GitHub Desktop.
Save waltermesser/e049774ad858415862caaa2c360ebd05 to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_footer', 'my_custom_popup_scripts', 500 );
function my_custom_popup_scripts() { ?>
<script type="text/javascript">
(function ($, document, undefined) {
jQuery('#pum-123')
.on('pumAfterOpen', function () {
setTimeout(function () {
jQuery(this).popmake('close');
}, 10000); // 10 Seconds
});
}(jQuery, document))
</script><?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment