Time Left shortcode

In our WoonderShop theme version 1.5.0 we introduced the time_left shortcode. This shortcode will count down to the time you specify in the time attribute. The time will be saved locally in the visitors browser, so it will continue the countdown even if he refreshes the page.

You can use this shortcode anywhere, where a shortcode can be outputted (text widget, page builder editor, sidebar, top navigation, …).

You should define your shortcode like this: [time_left time="1:45:19"]. This will count down from 1 hour, 45 minutes and 19 seconds. The output of this example on your page will be: 1 hour 45 minutes 19 seconds and it will start to count down. If the hour counter comes to 0, it will no longer be displayed, it will show only minutes and seconds: 45 minutes 19 seconds.

The time attribute should be in the following format hh:mm:ss. So a few examples are:

  • 12 hours 35 minutes and 3 seconds -> “12:35:03” -> [time_left time="12:35:03"]
  • 12 minutes and 19 seconds -> “0:12:19” -> [time_left time="0:12:19"]
  • 46 seconds -> “0:00:46” -> [time_left time="0:00:46"]
WoonderShop WooCommerce theme time left shortcode example
WoonderShop theme time_left shortcode example.