• 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 7 replies - 1 through 7 (of 7 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.

    Plugin Author Moove Agency

    (@mooveagency)

    Hello,

    A quick update

    The ‘Banner initialization delay’ is now a feature added to the CMS:

    Thomas Jarvis

    (@thomasjarvisdesign)

    Excellent thank you for doing this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Delay Loading’ is closed to new replies.