Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1410077

    Is it possible to load the Cookies Pop Up with a 5-10secs delay? or load it at the end of pageload?
    Thanks

    #1410198

    Hey keep12,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function delay_cookie_consent_bar() { ?>
      <script>
    (function($){
      $('.avia-cookie-consent-wrap .avia-cookie-consent').hide();
       setTimeout(function(){ 
           $('.avia-cookie-consent-wrap .avia-cookie-consent').slideToggle(100);  
       },5000);
    })(jQuery);
    </script>
      <?php
    }
    add_action('wp_footer', 'delay_cookie_consent_bar')

    this will delay for 5 seconds, change the 5000 to suit, each second is 1000

    Best regards,
    Mike

    #1410421

    Hello Mike,

    Thanks i will try it asap.

    Is it possible to load the cookie pop up at the end of webpage load? What do you recommend to make webpage load faster for the seo?

    Thanks for your time.

    #1410437

    Hi,
    If you want this for a faster load this won’t help, I checked your site on WebPageTest and linked the test below.
    The bigest issue that I see is youtube videos, I only see 4 videos on your homepage but they cause a lot of events in the test.
    It looks like you are adding those videos in a code block with the youtube code, try using the video element with the option Wait for user interaction to load the video this will only load the video and it’s scripts after the user clicks and speed up your page.
    You will then need to add a fallback image to show in the place of the video, try adding the video thumbnail or taking a screenshot of the video thumbnail to show.
    I don’t believe that the cookie bar is causing any significant delay

    Best regards,
    Mike

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