• Resolved Divyesh_kakrecha

    (@divyeshk71)


    Hey,

    First of all nice plugin! But one issue in the evergreen timer as I have setup.

    I have created an Evergreen timer and the set ends after 3 days. Also I have selected detection method cookie & IP Address. So it’s working good yesterday but today when I checked the countdown timer restart and show up on 2 days 24:59:59 again. It should be showing up 1 Day 24:59:59 but it’s not.

    I have used the site ground optimization plugin and I have also cleared cache serval times and even I checked on my phone but the results are the same for all devices.

    Could you please take a look or guide me if I did some mistake in settings.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @divyeshk71

    Can you try to exclude the page on which you’re displaying the timer from being cached in SG Optimizer?

    Best,
    Nabil

    Thread Starter Divyesh_kakrecha

    (@divyeshk71)

    Hi @nlemsieh

    Actually, I have added a countdown timer in the website header top bar. So it will visible on all pages. so we can’t exclude that page from cached.

    I also want to change the day’s text. Right now I have set endtime for 3 days but when it reaches 1 day the day text will be automatically changed days to day and when the day reached 00 then the days will be removed and keep the only timer. How can I do this?

    Please let me know. Thanks.

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @divyeshk71

    Actually, I have added a countdown timer in the website header top bar. So it will visible on all pages. so we can’t exclude that page from cached.

    Since evergreen timer relies on browser cookies, it may not work properly when page is heavily cached.

    I also want to change the day’s text. Right now I have set endtime for 3 days but when it reaches 1 day the day text will be automatically changed days to day and when the day reached 00 then the days will be removed and keep the only timer. How can I do this?

    While this is not currently doable out of the box, I suggest using this workaround by adding this code to functions.php under Appearance menu > Theme Editor:

    add_action('wp_print_footer_scripts', function(){
      ?>
    
    <script>
    
    (function($){
    
    $('.hurrytimer-campaign').on('update.countdown', function(e){
    
    if( e.offset.days === 0 ){
     $(this).find('.hurrytimer-timer-block:eq(0)').hide();
     $(this).find('.hurrytimer-timer-sep:eq(0)').hide();
    }
    
    if( e.offset.days === 1 ){
     $(this).find('.hurrytimer-timer-block:first-child .hurrytimer-timer-label').text('Day');
    }
    });
    
    })(jQuery);
    
    </script>
    <?php });
    • This reply was modified 4 years, 1 month ago by Nabil Lemsieh. Reason: code formatting
    Thread Starter Divyesh_kakrecha

    (@divyeshk71)

    Hi @nlemsieh

    Thank you for above solution. It’s works now perfectly.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Evergreen timer not working properly’ is closed to new replies.