Shortcode Reference
Dantian Course Cadence provides three shortcodes for the front end of your site. Add them to any page with the Block Editor’s Shortcode block (or by typing them into the classic editor).
| Shortcode | Shows | Typical page |
|---|---|---|
[dcc_student] |
A student’s weekly guidance, progress tracker, week navigation and search | “Weekly Guidance” / “Student Hub” |
[dcc_trainer_edit] |
The trainer view of a course’s guidance, with edit suggestions | “Trainer Hub” |
[dcc_email_prefs] |
Per-course email opt-in / opt-out for the logged-in student | “Email Preferences” |
All three need the visitor to be logged in. None of them show content to logged-out visitors — they show a short message and a login button that returns the visitor to the same page after they sign in.
How attribute values work
- Integer attributes take a positive whole number, for example
course_id="42". A value that isn’t a number counts as0(not set). - Boolean attributes are switched on by
true,1,yesoron, and off byfalse,0,nooroff. Any other value — including a typo such asture— counts as off. - Put values in straight double quotes:
heading="false". Attribute names are lower case.
Finding a course ID
| LMS mode | Where to find the ID |
|---|---|
| Tutor LMS / LifterLMS | Edit the course in WordPress. The ID is the number after post= in the browser address (for example post.php?post=42&action=edit → 42). |
| Native classes | Go to Course Cadence → Classes and edit the class. The ID is the number after class_id= in the browser address. |
[dcc_student]
The student guidance view. It has two modes:
- All-courses view (no
course_id) — one page showing every course the student is enrolled in, navigated by calendar week. Recommended for most sites. - Single-course view (
course_idset) — one course, navigated by week number, with optional history and trainer-notes sections.
What each view looks like is explained in On-page guidance and progress tracker. Search is covered in Guidance search.
Attributes
| Attribute | Type | Default | Allowed values | What it does |
|---|---|---|---|---|
course_id |
Integer | 0 (not set) |
A course ID (Tutor LMS / LifterLMS) or class ID (Native) | Not set: the all-courses view. Set: the single-course view for that course. |
show_history |
Boolean | false |
true / false |
Single-course view only. Adds a collapsed Show history / Hide history section containing a Week {N} Summary for each earlier week that has student guidance. Ignored in the all-courses view. |
show_trainer_notes |
Boolean | false |
true / false |
Single-course view only. Adds a Trainer Notes section with the week’s trainer-only prompts. Students can read anything shown here — use only when that is intended. Ignored in the all-courses view. Does not add trainer prompts to search. |
heading |
Boolean | true |
true / false |
All-courses view only. false hides the Your Learning Guidance page heading — useful when the page title already says the same thing. The single-course view has no page heading (it always shows the course name), so this has no effect there. |
week |
Integer | 0 (current week) |
A week number | Opens the page on a fixed week. A ?dcc_week= value in the page address overrides it. Rarely needed — see the note below. |
Examples
[dcc_student]
All enrolled courses, with the “Your Learning Guidance” heading.
[dcc_student heading="false"]
All enrolled courses, on a page whose title is already “Your Learning Guidance”.
[dcc_student course_id="42"]
Course 42 only.
[dcc_student course_id="42" show_history="true"]
Course 42 with earlier weeks available in a collapsed history section.
[dcc_student course_id="42" show_trainer_notes="true"]
Course 42 including trainer notes — for a page only staff can reach, or where students are meant to see those notes.
About week: on a single-course page, week pins the page to that week — the Return to Current Week link then returns to the pinned week, not today’s week, and a pinned week can be one the course hasn’t reached yet. On an all-courses page, week is only used if the student has exactly one course with a timeline, and never shows a date later than today. For normal guidance pages, leave it out and let the page follow the timeline.
Page address parameters
These are added automatically by the plugin’s links. You don’t need to type them, but they’re useful to recognise:
| Parameter | Used by | Effect |
|---|---|---|
dcc_week=N |
Single-course week navigation, email links, search results | Opens week N. On the all-courses page it needs dcc_course_id too (below). |
dcc_course_id=ID |
Email links, admin digest links, search results | Tells the all-courses page which course dcc_week belongs to. |
dcc_from=YYYY-MM-DD |
All-courses week navigation | Shows all courses as at that date (never later than today). |
Who sees what
| Visitor | All-courses view | Single-course view |
|---|---|---|
| Logged out | “Please log in to view your guidance.” + Log in to view your guidance button | Same |
| Logged in, no enrolments | “You are not enrolled in any courses.” | “You are not enrolled in this course.” |
| Logged in, enrolled | Their own courses | The course, if they’re enrolled; otherwise “You are not enrolled in this course.” |
| Trainer (not enrolled as a student) | “You are not enrolled in any courses.” — trainers should use [dcc_trainer_edit] |
“You are not enrolled in this course.” |
| WordPress administrator | Only courses they are personally enrolled in | Any course — administrators bypass the enrolment check for previewing |
Other messages: “No guidance available at this time.” (enrolled, but none of the courses has guidance to show), “Course ID {N} not found.” (wrong course_id), “No active timeline is configured for this course.” and “Guidance for this course begins on {date}.” (single-course view).
Where to place it
- Create one dedicated page, usually with the all-courses view, and add it to your student menu or course dashboard.
- Paste its URL into Course Cadence → Settings → Emails → Student preferences & links → Student Guidance Page URL. Weekly emails then include a “View this guidance online” link that opens the right week, and admin digest links point here too.
- Put only one
[dcc_student]on a page. Several single-course shortcodes on one page work, but they share the same week in the address, so navigating one moves them all.
[dcc_trainer_edit]
The trainer guidance view: what students see, private trainer notes, week navigation, the Week by Week / All Upcoming view toggle, the Suggest Edit button and suggestion status badges. See On-page guidance and progress tracker and Trainer edit workflow.
Attributes
| Attribute | Type | Default | Allowed values | What it does |
|---|---|---|---|---|
course_id |
Integer | 0 (not set) |
A course ID or class ID | Not set: shows Select a Course with every course the user is an instructor of. Set: opens that course directly. A ?dcc_course= value in the page address (added when a trainer picks a course from the list) overrides it. |
heading |
Boolean | true |
true / false |
false hides the Trainer Guidance View heading (or Trainer Guidance View – Upcoming Weeks in the All Upcoming view). The Select a Course heading on the course list is always shown. |
week |
Integer | 0 (current week) |
A week number | Opens the week-by-week view on a fixed week. A ?dcc_week= value in the page address overrides it. Rarely needed. |
Examples
[dcc_trainer_edit]
Course list for the logged-in trainer.
[dcc_trainer_edit course_id="42" heading="false"]
Course 42 directly, on a page already titled “Course 42 — Trainer Guidance”.
Page address parameters
| Parameter | Effect |
|---|---|
dcc_course=ID |
Opens that course (used by the course list’s View Guidance buttons). |
dcc_week=N |
Opens week N in the week-by-week view. |
dcc_view=single / dcc_view=multi |
Opens Week by Week or All Upcoming, overriding the trainer’s saved preference. |
dcc_year=YYYY |
Filters the course list by year (set by the Filter by year: menu). |
Who counts as a trainer
A trainer is a user your LMS names as an instructor of the course — the course author or an added instructor in Tutor LMS, a listed instructor in LifterLMS, or a member of the class’s Trainers list in Native mode. It’s decided per course and doesn’t depend on the user’s WordPress role. Details: Trainer edit workflow.
Who sees what
| Visitor | Course list (no course chosen) | A specific course |
|---|---|---|
| Logged out | “Please log in to access the trainer interface.” + Log in button | Same |
| Logged in, not an instructor of anything | “You are not assigned as a trainer to any courses.” | “Only assigned trainers can access this interface.” |
| Instructor of the course | Their courses, each marked “Active timeline configured” or “No timeline configured” | The trainer view for that course |
| Instructor of other courses only | Their own courses | “Only assigned trainers can access this interface.” |
| WordPress administrator | Only courses they are an instructor of | Any course (open it with ?dcc_course=ID or a page with course_id) |
| Student | “You are not assigned as a trainer to any courses.” | “Only assigned trainers can access this interface.” |
If the course has no current timeline: “The timeline for this course begins on {date}.” or “No active timeline configured for this course. Please set up a timeline in the admin area first.”
Where to place it
- Create a page such as “Trainer Hub” and share its URL with trainers. Students who find it see only the messages above, but you may prefer to keep it out of the student menu.
- One
[dcc_trainer_edit]per page.
[dcc_email_prefs]
The student’s email preferences page: a tick box for each enrolled course, a Subscribed / Unsubscribed badge, and a Save preferences button. Ticking or unticking saves straight away; the button is a backup (and the way to save without JavaScript). Full details: Email preferences.
Attributes
| Attribute | Type | Default | Allowed values | What it does |
|---|---|---|---|---|
heading |
Boolean | true |
true / false |
false hides the Email Preferences heading — useful when the page title already says it. |
Examples
[dcc_email_prefs]
[dcc_email_prefs heading="false"]
Who sees what
| Visitor | What they see |
|---|---|
| Logged out | “Please log in to manage your email preferences.” + Log in button |
| Logged in, no enrolments | “You are not enrolled in any courses.” |
| Logged in, enrolled | Their enrolled courses with tick boxes, the “How we use this data” note and the preferences warning text |
The page is the same for students, trainers and administrators — it lists the courses the logged-in user is enrolled in as a student.
Where to place it
- Create a page such as “Email Preferences” with
[dcc_email_prefs]and publish it. - Paste its URL into Course Cadence → Settings → Emails → Student preferences & links → Email Preferences Page URL.
- Make sure Email Preferences Link (same section) is ticked. Guidance emails then include a link to this page in the footer.
Opt-outs are honoured whether or not the footer link is turned on.
Troubleshooting
The page shows the shortcode text, e.g. [dcc_student].
The plugin isn’t active, or the shortcode was placed inside a Code or Preformatted block, which displays text as-is. Check Plugins, and use a Shortcode block.
A student sees “You are not enrolled in this course.”
Check their enrolment in your LMS (or class membership in Native mode) and the course_id on the page.
A trainer sees “Only assigned trainers can access this interface.” Add them as an instructor of that course in the LMS, or to the class’s Trainers list in Native mode.
show_history or show_trainer_notes has no effect.
These only work when course_id is set.
heading="false" didn’t hide the heading on a single-course student page.
That view has no page heading to hide — it shows the course name instead.
Worked example
Coastal Community Health runs a 12-week Rolling-timeline induction for new support workers on LifterLMS, plus a Fixed period Certificate III cohort.
| Page | Content | Notes |
|---|---|---|
| “My Weekly Guidance” | [dcc_student heading="false"] |
URL saved as Student Guidance Page URL. Each new starter sees their own induction week, counted from their enrolment date. |
| “Induction — Supervisor Preview” | [dcc_student course_id="318" show_history="true" show_trainer_notes="true"] |
Restricted to supervisors; administrators can view it without being enrolled. |
| “Trainer Hub” | [dcc_trainer_edit] |
Trainers pick the induction or the Certificate III and suggest edits. |
| “Email Preferences” | [dcc_email_prefs heading="false"] |
URL saved as Email Preferences Page URL, Email Preferences Link ticked. |