1. Home
  2. wpLEARNS for WooCommerce Sensei LMS Plugin Documentation
  3. Shortcodes

Shortcodes

Shortcodes give you a wide range of flexibility in customizing your Lifter site. Use shortcodes to quickly add content anywhere.

wpLEARNS for WooCommerce Sensei LMS Plugin: Course Shortcodes

Published Courses
To list all published courses…

[sensei_courses]

To list specific published courses, you can use shortcode arguments like this…

[sensei_courses teacher="Doe" category="desserts" exclude="45" number="5" orderby="name" order="asc"]

Options include:
teacher – Show courses from specific teacher(s)
category – Show courses from specific category(s)
exclude – Course/s you DON’T want to display
ids – List ID for any course/s you want to display
number – Number of courses that should display
orderby – Order courses by date, name, menu_order
order – Define if sort order should be asc (ascending) or desc (descending)

Featured Courses
To display all ‘featured courses’…

[sensei_featured_courses]
What are ‘Featured Courses’?

  • Mark a Course as ‘featured’ from the Course edit page.
  • Go to Courses > [Course Name] > “Featured Course”
  • Check the box next to ‘Feature this course’

To list specific ‘featured courses’, you can use shortcode arguments like this…

[sensei_featured_courses teacher="doe" number="10" orderby="name" order="asc"]

Course Categories
To list course categories, use this shortcode:

[sensei_course_categories]
[sensei_course_categories exclude="music" orderby="name" order="asc" hide_empty="true"]

wpLEARNS for WooCommerce Sensei LMS Plugin: Learner / User Shortcodes

To list all of the courses a logged in learner is taking…

[sensei_user_courses]

You can even specify the ‘status’ of courses that should display, like this!

[sensei_user_courses number="10" orderby="name" order="asc" status="active"]

Arguments for status are ‘active’ and ‘completed’

Want to promote courses to a logged in user? All courses that the user has not yet purchased? Use this shortcode:

[sensei_unpurchased_courses]

To list all private Sensei-produced messages available for the currently logged-in user, use this shortcode:

[sensei_user_messages]

Course Page Shortcodes
Want to display content for a Course on a page other than the Course page? For instance, on a WooCommerce Product Page? Use this shortcode:

[sensei_course_page id="543"]

Teacher Shortcodes
List all ‘teachers’ (users with a role of ‘teacher’). This shortcode will link teachers to their author archive page.

[sensei_teachers]

Limit the list of teachers that display by using ‘exclude’ and ‘include’ arguments. The number refers to the user ID.

[sensei_teachers exclude="23"]
Was this article helpful to you? Yes No

How can we help?