Displaying countdown timer in sticky bar
Keep countdown timer always visible to your visitors by displaying in the sticky announcement bar at the top or bottom of any page.
To get started, navigate to Appearance > Elements > Sticky bar:

Sticky bar settings
By default, a dismissed sticky bar will be hidden for 7 days. You can change that by using the option "When closed, re-open after".
Make sure the jQuery library is loaded, to do so, insert this code snippet in the functions.php under WordPress Appearance menu > Theme Editor:
add_action('wp_enqueue_scripts', function() {
if( ! wp_script_is('jquery') || ! wp_script_is('jquery', 'registered') ) {
wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', array(), null, true);
}
});
Last modified 2yr ago