Shortcodes

Shortcodes provide you with additional ways to insert SimplyLearn content into your courses, pages, posts and other custom post types. This article will list SimplyLearn content you can add to your site, and explain how to do it with both a shortcode.

What is shortcodes?

All shortcodes use square brackets ([ and ]), along with the name of the particular shortcode you’re using, and any parameters (options) you want to set.

Here’s a shortcode that displays a user’s Simplylearn profile information, in its default state, with no parameters:[ld_profile]

There’s one other way to use a shortcode. You can check to see if a certain thing is true, and if it is, output the contents contained within the shortcode. Here’s an example that would check to see if someone is enrolled in the course, and if they are, display a message.[student]Only a student enrolled in the course would see this.[/student]

You’ll notice this version has both an opening & a closing shortcode, with the closing shortcode being preceded with a forward slash (/).

All shortcodes

ShortcodeDescription
[ld_profile]Displays basic user information (name, avatar, etc.), as well as total courses, course points, a list of enrolled courses, quiz results & certificates earned.
[ld_user_course_points]Displays the earned course points, for that user, on any page.
[ld_course_list]Displays a list of courses. Many options are available to filter & customize the output.
[ld_lesson_list]Similar to [ld_course_list] but displays a list of modules.
[ld_topic_list]Similar to [ld_course_list] but displays a list of lessons.
[ld_quiz_list]Similar to [ld_course_list] but displays a list of quizzes.
[ld_group_list]Similar to [ld_course_list] but displays a list of groups.
[course_content]Displays a complete list of lessons, topics & quizzes associated with that course.
[user_groups]Displays the list of groups users are assigned to as either users or leaders.
[ld_course_expire_status]Displays the expiration date of a course for the current user.
[ld_video]Displays a video anywhere within a module or lesson page. You must be using video progression for this shortcode to work.
[ld_course_info]Displays a list of registered courses, course progress details & all quizzes the user has taken.
[learndash_login]Displays a login link that reveals the Simplylearn login & registration pop-up modal when clicked.
[ld_certificate]Displays a download link of an earned certificate.
[ld_course_resume]Returns a user to the last step in the Course (format: link/button).

[visitor]Displays content if a user is NOT enrolled in a course. Requires a closing [/visitor]

 tag.

[student]Displays content if a user IS enrolled in a course. Can also be used to display content to individual users (based on user id). Requires a closing [/student]

 tag.

[course_notstarted]Displays content if a user has access to a course, but has not completed any steps. Requires a closing [/course_notstarted]

 tag.

[course_inprogress]Displays content if a user has access to a course, has completed at least one step, but has not finished the entire course. Requires a closing [/course_inprogress]

 tag.

[course_complete]Displays content if a user has fully completed a course. Requires a closing [/course_complete]

 tag.

[ld_quiz_complete]Displays content if a user has completed a quiz. Requires a closing [/ld_quiz_complete]

 tag.

[ld_group]Displays a specified message to group enrollees.Requires specified group ID and a closing [/ld_group]

tag.

Previous
Make your Vimeo videos only available on your domain Next