Trends

Learndash Certificate Shordcode : LearnDashLMS Version 3.1.1

Certificate Shortcodes


Shortcode Options

You may use shortcodes to customize the display of your certificates. Provided is a built-in shortcode for displaying user information.

[usermeta]

This shortcode takes a parameter named field, which is the name of the user meta data field to be displayed.
Example: [usermeta field="display_name"] would display the user's Display Name.
See the full list of available fields here.

[quizinfo]

This shortcode displays information regarding quiz attempts on the certificate. This shortcode can use the following parameters:
  • SHOW: This parameter determines the information to be shown by the shortcode. Possible values are:
    1. score
    2. count
    3. pass
    4. timestamp
    5. points
    6. total_points
    7. percentage
    8. quiz_title
    9. course_title
    10. timespent

    Example: [quizinfo show="percentage"] shows the percentage score of the user in the quiz.
  • FORMAT: This can be used to change the timestamp format. Default: "F j, Y, g:i a" shows as March 10, 2001, 5:16 pm.
    Example: [quizinfo show="timestamp" format="Y-m-d H:i:s"] will show as 2001-03-10 17:16:18
See the full list of available date formatting strings here.

[courseinfo]

This shortcode displays course related information on the certificate. This shortcode can use the following parameters:
  • SHOW: This parameter determines the information to be shown by the shortcode. Possible values are:
    1. course_title
    2. course_points
    3. user_course_points
    4. completed_on
    5. cumulative_score
    6. cumulative_points
    7. cumulative_total_points
    8. cumulative_percentage
    9. cumulative_timespent
    10. aggregate_percentage
    11. aggregate_score
    12. aggregate_points
    13. aggregate_total_points
    14. aggregate_timespent
    cumulative is average for all quizzes of the course. aggregate is sum for all quizzes of the course.
    Example: [courseinfo show="cumulative_score"] shows average points scored across all quizzes on the course.
  • FORMAT: This can be used to change the date format. Default: "F j, Y, g:i a" shows as March 10, 2001, 5:16 pm.
    Example: [courseinfo show="completed_on" format="Y-m-d H:i:s"] will show as 2001-03-10 17:16:18


1 comment: