Auto-close pop-up and hide for a couple days

I'm trying to have the popup automatically close after 20 seconds, and prevent that from displaying to the user before 7 days if the popup is manually closed.

See image

Unfortunately if the auto-close option is activated, the cookies that makes the expire options possible are not set in the browser. Which causes the pop-up to display every time the page load.

Any possible workaround to have both features at the same time?

  • Predrag Dubajic
    • Support

    Hi Momoka,

    This behavior is set by design and at the moment there’s no way of doing it “out of the box”.

    I did ping our developers about this to see if there’s a workaround that could be applied.

    Please note that developer response might be slower than usual staff response, so we appreciate your patience on this.

    Best regards,


  • Predrag Dubajic
    • Support

    Hi Momoka,

    Can you try downloading the attached file, unzip it and place it inside wp-content/plugins/hustle/assets/js/ folder, and overwrite the existing one.

    The message about two options will still be there but they should be working nevertheless.

    Also, please note that these are core plugin changes so after update is released you will need to apply modified file again, however, devs are discussing about including this as default behavior in future releases.

    Best regards,


  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Momoka !

    You can achieve what you want by adding this code into your functions.php ( preferably in your child-theme ). This will emulate a users 'click'.

    Make sure to change the number in $('.module_id_1 in the code to correspond to your Slide-In ID. You can find the ID by editing the Slide-In and looking at your address bar ( see address bar attached screenshot ). As an example if you have &id=12 then you should make it .module_id_12.

    I'm also attaching a screenshot showing my testing settings. I only have the "No longer show this message across the site" enabled.

    Extra not: the } , 20000 ); part of the code is the 20s you want but in miliseconds. You can change that to anything you like. In example 3000 would be 3 seconds instead.

    add_action( 'wp_footer', function() {
    ( function ( $ ) {
    $( 'document' ).ready( function() {
    setTimeout( function(){
    $('.module_id_1 .hustle-modal-close .hustle-i_close').click();
    } , 20000 );
    } );
    } )( jQuery )
    } );

    Tell me if this helps!



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.