How to Add a Forced Lesson Timer in LearnDash
How to require a minimum time on a LearnDash lesson or topic before it can be marked complete: the timer setting and format, the countdown cookie, server checks, admin bypass and limits.

Compliance training often has to prove that learners spent a minimum time on the material. LearnDash's answer is the lesson timer: a per-lesson or per-topic setting that disables the Mark Complete button until a set number of minutes has counted down on the page. It is simple to configure and does what it says, as long as you understand that it measures time with the page open, not attention, and that the enforcement has a client-side component.
This guide shows how to add a LearnDash forced lesson timer, the format the field expects, how the countdown and its cookie work, what the server verifies when the button is finally pressed, who bypasses it, and the situations where it is not the right tool.
Setting the timer
Edit the lesson or topic, open Settings and find the Display and Content Options box. Switch on the Lesson Timer (forced_lesson_time_enabled) and enter a duration in the timer field (forced_lesson_time). The help text explains the effect: the lesson cannot be marked as completed until the set time has elapsed. The field is a timer entry that accepts hours, minutes and seconds in the form 1h 30m 20s; any component can be omitted, so 10m or 90s are valid. If the switch is on and the time is empty, the plugin clears the switch on save, so a value is required. Click Update.
In code, learndash_forced_lesson_time( $post ) returns the raw setting for a lesson or topic (or zero when disabled), and learndash_convert_lesson_time_time() converts that string to seconds for the countdown.
What the learner sees
When an enrolled learner opens the step, the Mark Complete button renders disabled, with a countdown next to it showing the remaining time. The countdown is a span with the class learndash_timer and a data-timer-seconds attribute, driven by a small script that ticks it down once per second while the page is open. When it reaches zero the button is enabled and the learner can complete the step as normal. Leaving the page pauses the timer; the remaining time is remembered in a cookie, so returning later resumes the countdown rather than restarting it.
How the cookie and server check work
The remaining seconds are stored in a browser cookie named learndash_timer_cookie_ followed by a key derived from the step. The script updates it as the timer runs and writes zero when the countdown finishes. On the server side, two checks read it. When rendering the button, the plugin enables it immediately if the cookie exists and is zero, which is what makes a return visit after completing the timer skip the countdown. When the completion form is submitted, learndash_can_complete_step() refuses the completion unless the cookie is present and zero, so posting the form directly before the time has elapsed does not work. The step completion code then clears the cookie once the step is complete.
The plugin's own source comments note that this is not a complete guarantee: the cookie is set by the browser, and a technically minded learner could set it by hand. For most compliance purposes the timer is accepted as a reasonable control; for high-stakes attestations, pair it with a quiz on the content rather than relying on time alone.
Who bypasses the timer
Administrators do not see the countdown when the bypass option under Settings > General > Admin User Settings is on, which is the default, so test with a subscriber account. Group leaders follow their own bypass setting under Settings > Groups. The completion check also accepts an argument to ignore the timer, which the plugin uses when an administrator marks a step complete from the learner's profile, so admin-driven completions are never blocked by it.
Timer with video, assignments and quizzes
The timer is one of several step gates and they stack. A lesson with video progression and a timer requires both the video to finish and the time to elapse. A lesson with an assignment requires the upload too, and the completion check tests the timer before the assignment. A quiz inside the lesson is not timed by the lesson timer; quizzes have their own time limit setting, covered in our guide to adding a time limit to a quiz, which measures the opposite thing: a maximum rather than a minimum. For video-based lessons, video progression alone is often the better proof of time spent, as our video progression guide explains.
Choosing a duration
Set the timer below the honest reading time, not at it. A fifteen-minute lesson with a fifteen-minute timer punishes fast readers and teaches everyone to open the lesson and walk away. A timer at roughly half the expected reading time stops click-through without becoming the thing learners remember about your course. If the content is short, consider whether a timer is needed at all; a two-question check at the end proves more than ninety seconds on a page.
Troubleshooting
- No countdown appears. You are an administrator with bypass on, or the Lesson Timer switch was cleared because the time field was empty. Check the setting and test as a subscriber.
- The timer restarts on every visit. Cookies are blocked or cleared by the browser, or a caching layer is stripping the cookie. Check in another browser.
- The button never enables. A JavaScript error elsewhere on the page has stopped the timer script. Check the browser console; theme and page-builder conflicts are the usual cause.
- Learners complete early. They are group leaders with bypass on, or the completion came from an administrator editing their profile.
If the Mark Complete button is missing entirely rather than disabled, that is a different problem; see our guide on the Mark Complete button not showing.
When to get help
Setting a timer is a lesson setting. Developers come in when time on task must be recorded server-side for audit, when timers should apply across a whole course from one setting, or when a regulator requires tamper-resistant evidence. Those involve logging through LearnDash's activity hooks rather than the cookie, and they are the kind of compliance work our LearnDash services team handles; a LearnDash developer can add server-side time logging in a short engagement.
Frequently asked questions
What format does the LearnDash lesson timer field take?
Hours, minutes and seconds written as 1h 30m 20s, with any part omitted. Ten minutes is 10m.
Does the timer keep counting if the learner closes the tab?
No. The remaining time is saved in a cookie and resumes when they return to the step in the same browser.
Can learners bypass the forced lesson timer?
Administrators and group leaders with bypass enabled skip it. Ordinary learners cannot submit the completion early through the form, though the control relies on a browser cookie and is not tamper-proof.
Can I set a timer on a whole course?
Not with one setting. Timers are per lesson and per topic. A developer can apply a default through the lesson settings on save or by filtering the timer value.
Add worldwincoder.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.
