Available Courses Shortcodes

What is a shortcode?

Shortcodes are small placeholders you can insert almost anywhere within your WordPress page and post content. When visitors view the page, those placeholders get processed and replaced with some dynamically generated content instead.

Currently Available Courses Shortcodes

MemberPress Courses plugin includes several shortcodes that allow you to display courses or sections on any post or page outside the default course page.

Here is the list of these shortcodes:

[mpcs-my-courses] 
Displays courses list with pagination but only for logged-in users. The default number of courses is 6 per page, but you can change it by applying the mpcs_courses_per_page filter as it is explained here - mpcs_courses_per_page.

[mpcs-course-overview {parameters go here - see below}]
Displays the list of all sections and lessons from a specific course. It requires only one parameter from the list below:

  • course_id - Course ID that you want to display. You can get this ID when you open the course in the WordPress Dashboard and check the number after the post parameter in the address bar. Where to find Course ID?
  • lesson_id - Lesson ID from the course that you want to display. To get this ID open the lessons page using a similar link: https://your-domain.com/wp-admin/edit.php?post_type=mpcs-lesson (make sure to replace your-domain.com part with your domain name), click lesson, and check the number after post parameter in the address bar. Where to find Lesson ID?

An example shortcode might look like the following: [mpcs-course-overview course_id="710"]

[mpcs-section-overview lesson_id="869"]
Displays the list of lessons from a specific section. In order to select a section, you need to pass the lesson ID parameter from the section you want to display. To get lesson ID open the lessons page using a similar link: https://your-domain.com/wp-admin/edit.php?post_type=mpcs-lesson (make sure to replace your-domain.com part with your domain name), click lesson, and check the number after post parameter in the address bar. Where to find Lesson ID?

[mpcs-purchase-button membership_id="9" text="Enroll Now"]
Displays purchase button that will redirect users to a membership signup page taken from membership_id parameter. Where to find a Membership's ID?. Optionally, you can add a text parameter to change the default "Enroll" button text.

If you want to know more about shortcodes used in MemberPress, please check the list of available shortcodes.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.