• Resolved rayeason

    (@rayeason)


    Hello and good day.

    Is there a way to delay the loading of the footer for a certain amount of time after the visitor has landed on the page?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @rayeason

    Thanks for using our plugins.

    You can add the following snippet to your functions.php:

    add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 );
    function gdpr_delay_script_execution( $ms ) {
      return 5000; // 5000 ms = 5 seconds.
    }

    Hope this helps.

    Thread Starter rayeason

    (@rayeason)

    Will this get removed when the plugin or theme is updated?

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @rayeason

    It should not get overwritten if your theme is properly coded.

    Hope this helps.

    Thomas Jarvis

    (@thomasjarvisdesign)

    @mooveagency
    I’ve just seen this snippet looking for a simillar solution but the opposite.

    What is the default delay on script execution?

    I would like to reduce this delay so the popup appears instantly.

    If I change the delay to zero as below will this work?

    add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 );
    function gdpr_delay_script_execution( $ms ) {
      return 0; // 0 ms = 0 seconds.
    }
    Plugin Author Moove Agency

    (@mooveagency)

    Hi @thomasjarvisdesign

    Thanks for using our plugins.

    Yes, the snippet with “0” value will remove the delay and the GDPR banner becomes visible once the JS is loaded by the browser.

    Hope this helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.