Case study: building dynamic course certificates with LearnDash and ACF integration
Issue background
A certification-based training organization wanted to automate the creation and delivery of course completion certificates on their LearnDash LMS site. Previously, staff manually created each certificate and uploaded it to user profiles — a process that became increasingly time-consuming as enrollment grew.
The goal was to dynamically generate personalized certificates containing course-specific and user-specific data, including:
- Student name
- Course name and completion date
- Certificate ID and course type
- Credit hours and CEUs (continuing education units)
- Expiration date
The certificates also needed to be downloadable as PDFs and trigger automated renewal reminders before expiration.
Diagnosis
Freshy’s development team analyzed LearnDash’s native certificate system and found several limitations that required enhancement or custom development:
- Default LearnDash certificates are static. Certificates could dynamically insert a student’s name and completion date but lacked support for advanced data like certificate IDs, expiration dates, and custom metadata.
- No native tracking for CEUs or certificate expiration. LearnDash does not store expiration dates or renewal data in the user meta, limiting automation potential.
- Roster imports were manual. Admins had to upload each certificate individually, with no batch import option from external spreadsheets.
- PDF generation required front-end integration. Users needed a seamless way to access and download their personalized certificates from their profiles.
To address these constraints, the team evaluated third-party solutions such as the WooNinjas LearnDash Certificate Verify & Share add-on, while exploring Advanced Custom Fields (ACF) as a potential bridge for missing metadata.
Resolution steps
1. Dynamic field testing
Developers tested dynamic placeholders within LearnDash templates to confirm support for:
[usermeta field="first_name"]and[usermeta field="last_name"][courseinfo show="completed_on"]for course completion date
For unsupported data (e.g., expiration date, credit hours, CEU), the team created custom shortcodes using PHP:
function learndash_certificate_expiration_date() {
$completion_date = get_user_meta(get_current_user_id(), 'course_completed_on', true);
if ($completion_date) {
$expiration = date('m/d/Y', strtotime($completion_date . ' +2 years'));
return $expiration;
}
return '';
}
add_shortcode('certificate_expiration', 'learndash_certificate_expiration_date');
This allowed each generated certificate to display a personalized expiration date based on course completion.
2. Integrating ACF for certificate metadata
To manage extra fields such as “Certificate Number,” “Course Type,” and “Credit Hours,” the team added ACF repeater fields on the WordPress user profile screen.
Each certificate entry included:
- Certificate name
- File upload (PDF)
- Issue date
- Expiration date
- Course type (dropdown)
This setup allowed admins to manually upload certificates or override dynamic ones when necessary.
3. Automating certificate delivery
To enhance the user experience, developers built a shortcode to display the uploaded certificates in each user’s account dashboard:
function display_user_certificates() {
$certificates = get_field('user_certificates', 'user_' . get_current_user_id());
if ($certificates) {
foreach ($certificates as $cert) {
echo '<p><strong>' . esc_html($cert['certificate_name']) . '</strong> -
<a href="' . esc_url($cert['certificate_file']['url']) . '" download>Download PDF</a></p>';
}
}
}
add_shortcode('user_certificates', 'display_user_certificates');
This shortcode displayed a clean, styled list of certificates on the front end, ensuring users could easily access their completed course documents.
4. Building certificate reminder automation
Since LearnDash did not support certificate expiration reminders out of the box, the team added a cron-based notification system:
- Notifications were scheduled to send 6 months, 90 days, and 60 days before expiration.
- Reminder emails included personalized content and renewal links.
This ensured compliance continuity and reduced administrative overhead for follow-ups.
Final outcome
The final build achieved a flexible, scalable certification workflow:
- Each course now automatically generates a dynamic PDF certificate upon completion.
- Admins can manually upload certificates when needed via the backend.
- Students can download their certificates directly from their dashboard.
- Automated expiration reminders reduce administrative work.
The solution combined LearnDash, Advanced Custom Fields, and custom PHP automation to replace a manual multi-step process with a streamlined, professional certification system.
Need a custom LearnDash certification system?
Freshy can help you extend LearnDash beyond its out-of-the-box limits — from dynamic certificates to CEU tracking and automation.
👉 Contact Freshy to discuss how we can optimize your LMS experience.