Kibworks Dynamic Tags for LearnDash
Adds LearnDash course, progress and step data to Elementor as dynamic tags.
by Shakib Shown · github.com/shakib6472/kibworks-dynamic-tags-for-learndash · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/shakib6472/kibworks-dynamic-tags-for-learndash/archive/refs/heads/main.zipUse LearnDash course, pricing, progress and step data anywhere in Elementor through dynamic tags, with no shortcodes or custom PHP.
Description
This plugin registers a LearnDash LMS group in Elementor's dynamic tags panel so you can drop LearnDash data straight into any widget, on any page, without writing shortcodes or template code.
Every tag works in three places:
- Inside a Loop Grid, where it reads the course of the current loop item.
- On a course, lesson, topic or quiz page, where it detects the course automatically (steps map back to their parent course).
- On any other page, where you pick a specific course from the tag's own Course dropdown.
Course information
- Course Price - the price with its subscription terms, e.g. "$15 / month"
- Trial Info - e.g. "7 days free trial", empty when the course has no trial
- Course Certificate - whether a certificate is attached
- Short Description - from Course Grid or the course settings
- Course Duration - Course Grid duration, formatted as hours + minutes, whole hours, total minutes or raw seconds
- Ribbon Text and Custom Button Text - the Course Grid card fields
- CTA Button Text - "Start Learning" or "Enroll Now" depending on the user's access
- Purchase Button URL - resume link for enrolled users, enrollment or custom purchase URL otherwise
- First Lesson URL - the first step the user has not finished yet
Counts
- Total Steps, Total Lessons, Total Topics, Total Quizzes
- Total Steps (Navigable) - includes quizzes, and is the count that matches Step Number
Per-user progress
- Course Progress % - a plain number, so it can drive Elementor's Progress Bar widget directly
- Completed Steps and Total Steps (Progress)
- Course Status - "Not Started", "In Progress" or "Completed", with a slug option for CSS hooks
- Certificate Download URL - available once the course is completed
Lesson, topic and quiz pages
- Step Number and Total Steps (Navigable) for a "Step 3 of 12" line
- Next Step URL and Previous Step URL, following the real course order
- Parent Course Title and Parent Course URL
- Step Completed - with a slug option for CSS hooks
Any other course setting
The LD Course Setting tag exposes every field LearnDash stores in the course settings, with a format option for raw text, numbers, yes/no, dates and URLs. Use it for seats limit, course points, prerequisites, start and end dates, access expiry and anything else your setup stores.
Not affiliated with LearnDash or Elementor
This is an independent add-on. LearnDash is a trademark of Liquid Web, LLC and Elementor is a trademark of Elementor Ltd. This plugin is not affiliated with, endorsed by, or sponsored by either of them.
Installation
- Make sure LearnDash, Elementor and Elementor Pro are installed and active. Dynamic tags are an Elementor Pro feature.
- Upload the plugin folder to
/wp-content/plugins/, or install the zip through Plugins > Add New > Upload Plugin. - Activate the plugin.
- Edit any page with Elementor, click the dynamic tag icon next to a control, and pick a tag from the LearnDash LMS group.
Frequently Asked Questions
Does this need Elementor Pro?
Yes. Dynamic tags are a Pro-only feature of Elementor, so the free version alone is not enough. The plugin shows an admin notice listing whatever is missing.
Why is a tag showing nothing?
Most tags render empty when there is no course to read. That happens on pages with no course context, in which case pick a course in the tag's Course dropdown. Certificate Download URL is also empty until the user has actually completed the course.
Why does "LD Total Steps" differ from "Total Steps (Navigable)"?
LearnDash counts lessons and topics as steps but not quizzes, and "LD Total Steps" follows that definition. "Total Steps (Navigable)" counts everything a learner can open, quizzes included, and is the number that lines up with Step Number. Pair Step Number with the navigable count, otherwise a course can read "Step 6 of 5".
Does it work inside a Loop Grid?
Yes. Leave the Course dropdown empty and each card reads its own course.
Changelog
1.1.0
- Added the LD Course Setting tag, giving access to every field in the LearnDash course settings.
- Added per-user progress tags: progress percentage, completed steps, total steps, course status and certificate download URL.
- Added Course Grid tags: duration, ribbon text, custom button text and short description.
- Added Trial Info, and Course Price now reports real subscription terms instead of always appending "/month".
- Added lesson level tags: step number, navigable step count, next and previous step URL, parent course title and URL, and step completion.
- Added a Course picker to every tag so the tags can be used on pages that have no course context.
- Fixed the tags never registering at all, because the LearnDash dependency was checked before LearnDash had loaded.
- Fixed resume links pointing at the wrong step. Course steps are now read in real course order rather than grouped by post type.
- Fixed a doubled query string in the Purchase Button URL.
- Fixed the text domain not matching the one declared in the plugin header.
- Removed the
?free_enroll=self-enrollment handler, which was specific to one site. - Course step lookups and progress lookups are now cached per request, so a Loop Grid no longer queries the same course once per tag.
1.0.0
- Initial release.
Upgrade Notice
1.1.0
Adds progress, Course Grid and lesson level tags, and fixes the dependency check that stopped the tags from registering. The ?free_enroll= handler has been removed.