Skip to main content

8.3 Shortcode Reference

Each shortcode belongs to a feature and only works while that feature is enabled on the Features tab.

[gravityform-lesson]

Feature: Gravity Forms Lesson/Topic Completion

Displays the Gravity Forms form selected in the current lesson's settings. Submitting it marks the lesson complete for the logged-in learner and redirects to the next course step. Takes no parameters. The form comes from the lesson's Gravity Form for Lesson/Topic Completion setting.

[gravityform-lesson]

[gravityform-topic]

Feature: Gravity Forms Lesson/Topic Completion

The topic equivalent of [gravityform-lesson]: displays the form selected in the current topic's settings; submission completes the topic.

[gravityform-topic]

[add-group-users]

Feature: Group: Users management

Renders the group leader's user-creation interface: queue users by name and email, save each row, then create them all. Created users join the group and receive their login details by email.

ParameterRequiredDescription
group_idYesThe LearnDash group to add users to.
[add-group-users group_id="123"]

[remove-group-user]

Feature: Group: Users management

Renders a button that removes a specific user from a group. The user's WordPress account is not deleted.

ParameterRequiredDescription
group_idYesThe group to remove the user from.
user_idYesThe user to remove.
classNoExtra CSS class(es) for the button.
[remove-group-user group_id="123" user_id="456"]

[certificate-image-2]

Feature: Certificate Image

Outputs the certificate's second featured image as a standard image tag. Outputs nothing if the certificate has no second image.

ParameterRequiredDescription
idInside a certificate: no. Elsewhere: yesThe certificate post ID.
sizeNothumbnail, medium, large, a theme-registered size, or a pixel number. Defaults to full size.
widthNoWidth in pixels; overrides size. Used for height too if height is omitted.
heightNoHeight in pixels; used with width.
classNoExtra CSS class(es) for the image.
[certificate-image-2 id="456" size="medium"]

[tt_patch_user_progress]

Feature: Shortcode for patching missing progress

Invisible action shortcode: on page load, checks the given user's progress in a course up to a given step and repairs small holes. Renders no output.

ParameterRequiredDescription
course_idYesThe course to patch.
topic_idYesThe step the learner is trying to reach.
user_idNoDefaults to the logged-in user.
[tt_patch_user_progress course_id="123" topic_id="456"]
note

The shortcode name uses underscores (tt_patch_user_progress), unlike the other shortcodes, which use hyphens.