This members-only tutorial provides the steps to set up a countdown timer in Oxygen with the value coming from a Date Time Picker type of custom field on an Options page instead of hardcoding the value (like "Nov 23, 2028 00:00:00").

ACF Options page

Countdown timer on the front end

Step 1

Install and activate ACF Pro and Code Snippets plugins.

Step 2

Let us enable an ACF Options page.

Go to Snippets > Add New.

Title: Enable ACF Options Page


if ( function_exists( 'acf_add_options_page' ) ) {

Go to Custom Fields > Add New.

Create a field group titled say, "Sitewide" having a Date Time Picker-type of custom field with the name of countdown_date. Set it to appear on the Options Page.

Set Display Format and Return Format to F j, Y H:i:s.

Step 3

Install and activate My Custom Functionality plugin.

Connect to your hosting account using a FTP client and navigate to site's /wp-content/plugins/my-custom-functionality-master.

Create a file named say, countdown-date.js in the plugin's assets/js directory having the following code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: