Tutor LMS comes pre-packaged with a ton of shortcodes you can use to display various information. Here is your comprehensive list of all Tutor LMS shortcodes, along with how to use them.
Tutor LMS Shortcode Reference
Here’s a complete list of every available Tutor LMS shortcode.
If you want to dig into the code, you can find a complete list of all Tutor LMS shortcodes and their parameters in /tutor/classes/Shortcodes.php
Shortcode | Description |
[tutor_course] | Displays a single course or list of courses. Many options are available to filter & customize the output. Available Parameters: 1.id 2. exclude_ids 3. category 4. orderby 5. order 6. count 7. column_per_row 8. course_filter 9. show_pagination |
[tutor_dashboard] | Displays student dashboard. |
[tutor_student_registration_form] | Display Student Registration form |
[tutor_instructor_registration_form] | Displays course instructor registration form. |
[tutor_instructor_list] | Displays list of course instructors. Available Parameters: 1. column_per_row 2. filter 3. count 4. layout |
How to Use Them Tutor LMS Shortcodes
Tutor Course [tutor_course]
A list of courses.
Parameters:
Option | Description | Values |
id | IDs of List of courses to display | Any valid course ID(s) (comma separated) |
exclude_ids | IDs of List of courses to exclude | Any valid course ID(s) (comma separated) |
category | Course category | Any valid course category ID, slug, or term name |
orderby | How to order the courses | ID, title, rand, date |
order | Sort order | DESC, ASC |
count | Any valid number | |
column_per_row | Courses per column | Any valid number |
course_filter | Display course filter | on, off |
show_pagination | Display course pagination | on, off |
Example:
[tutor_course id="20,64" exclude_ids="567,332" category="18,19" orderby="ID" order="desc" count="3" column_per_row='3'
course_filter='off' show_pagination='on']
Tutor Dashboard [tutor_dashboard]
Tutor Dashboard for students
Instructor Registration Form [tutor_instructor_registration_form]
Instructor Registration
Instructor List [tutor_instructor_list]
Course instructor list
Parameters:
Option | Description | Values |
column_per_row | Instructors per column | Any valid course ID(s) (comma separated) |
filter | Filter attribute controls the presence of category, search, and rating filters in the instructor listing. | on, off |
count | Number of instructors to display | Any valid number |
layout | layout for the instructors’ list | pp-top-full, pp-cp, pp-top-left, pp-left-middle, pp-left-full |
Example:
[tutor_instructor_list column_per_row="1" filter=on count="2" layout="pp-top-left"]
Shortcode for Enrolled Courses
Custom shortcode for enrolled courses. Insert this snippet in your themes functions.php
<?php
/**
* Enrolled Course Shortcode
*/
function tutor_enrolled_course_register_shortcodes() {
add_shortcode( 'enrolled-course', 'shortcode_tutor_enrolled_course' );
}
add_action( 'init', 'tutor_enrolled_course_register_shortcodes' );
/**
* Shortcode Callback
*/
function shortcode_tutor_enrolled_course( $atts ) {
?>
<h3><?php _e('Enrolled Courses', 'tutor'); ?></h3>
<div class="tutor-course-list tutor-grid tutor-grid-3">
<?php
$user_id = get_current_user_id();
$my_courses = tutor_utils()->get_enrolled_courses_by_user($user_id);
if ($my_courses && $my_courses->have_posts()):
while ($my_courses->have_posts()):
$my_courses->the_post();
$post = $my_courses->post;
?>
<div class="tutor-card tutor-course-card">
<?php tutor_load_template( 'loop.thumbnail' ); ?>
<div class="tutor-card-body">
<?php tutor_load_template( 'loop.rating' ); ?>
<div class="tutor-course-name tutor-fs-6 tutor-fw-bold tutor-mb-32">
<a href="<?php echo esc_url( get_the_permalink() ); ?>">
<?php the_title(); ?>
</a>
</div>
<div class="tutor-mt-auto">
<?php tutor_load_template( 'loop.enrolled-course-progress' ); ?>
</div>
<div class="tutor-mt-24">
<?php tutor_course_loop_price(); ?>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
else :
tutor_utils()->tutor_empty_state( tutor_utils()->not_found_text() );
endif;
?>
</div>
<?php
}
Example:
[enrolled-course]