How it Works

This is a multi-purpose plugin that offers native course features and includes integration modules for top LMS/e-learning plugins for WordPress.

  • Use the default module to organize course content, protect access by membership level, and track lesson completion by user.
  • Or, use LearnDash or LifterLMS alongside this integration plugin to restrict course access by membership level.

Installation | Modules | Default Module | LearnDash Module | LifterLMS Module | Screenshots | Action and Filter Hooks


Installation

  1. Install the Add On via the Plugins > Add New in the WordPress dashboard. Or, upload the pmpro-courses directory to the /wp-content/plugins/ directory of your site.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Navigate to Memberships > Courses in the WordPress admin to configure modules.

Configure Course Modules

The Courses settings page controls which modules are active in your membership site. In most cases, you will only need to have one module active at a time. Navigate to Memberships > Courses to choose from the following settings:

  • Default Module: Use the built-in course and lesson custom post types to build a basic e-learning component in your WordPress membership site.
  • LearnDash: Enable the LearnDash module to enable course protection by membership level for your courses in the LearnDash LMS.
  • LifterLMS: Enable the LifterLMS module to enable course protection by membership level for your courses in LifterLMS.

Use the Default Course and Lesson Module

The default courses module organizes your course content, protects access by membership level, and tracks lesson completion. You can create an unlimited number of courses and lessons, organize them by your course categories, protect lesson content by membership level, and allow members to track lesson completion.

First, navigate to Memberships > Courses and check the box “Default” to enable the Course and Lesson post types bundled with PMPro Courses. After you save settings, a new “Courses” menu item will be added to your WordPress admin area.

  • Use the ‘Courses’ page in the WordPress admin to create a new course or edit existing courses.
  • Navigate to Courses > Lessons to create new lessons or edit existing lessons.
  • Navigate to Courses > Course Categories to create or manage course categories.

Create and Edit Courses

The Courses post editor accepts general course post content just like any WordPress block editor experience. By default, the full course content displays for all users, even for member protected courses. We believe that your course landing page is the “sales content” that encourages membership signups. Individual lessons in a protected course are not accessible for non-members.

  • The “Course Category” metabox lets you categorize your course.
  • The “Lessons” metabox has tools to add, remove, and reorder lessons within the course.
  • The “Require Membership” metabox on the Edit Course screen protects this course by membership level.

Course and lessons can be public or require membership. When a course requires membership, every lesson within that course is automatically protected. Non-members cannot view a single lesson page in a protected course. If they happen to know a lesson’s URL, the logic in this plugin redirects them to the course page.

Note: Uou may initially see a ‘404: Page Not Found’ error when trying to view a built-in Course or Lesson post type. Navigate to Settings > Permalink and click “Save Changes” to resolve this issue. This step “flushes the rewrite rules” in your WordPress site and allows the Course and Lesson custom post types to use your default rewrite rules.

Protect LearnDash Courses

LearnDash turns your WordPress site into a learning management system. This premium software manages various e-learning components including courses, lessons, sections, topics, and quizzes. Our Courses for Membership Add On creates a bridge between the content protections of PMPro and the course functionality of LearnDash.

This Add On does not include any update scripts to manage enrollment for existing members. All members who have an existing membership level will not be automatically enrolled in a course once you add protection. Course protection and enrollment is hooked in the level change event: only new members or members that cancel or change their level will be updated. You must manually add current members to newly protected courses, and you must manually remove enrolled users that do not have the correct membership level for access.

  • To protect your LearnDash courses, navigate to Memberships > Courses and check the box “LearnDash” to enable the LearnDash module. Then, save settings.
  • Now, edit your LearnDash course and locate the “Require Membership” metabox. Check any memberships levels that you want to allow access for this course.
  • Set the Course Access Settings to “Closed”. Then, save and update your course. Refer to the LearnDash documentation for more information on Course Access Settings.
  • Optional: Set the “Course Content” to “Only visible to enrollees” on the Display and Content Options screen. Refer to the LearnDash documentation for more information on Course Display & Content Settings.
  • If a user viewing your course does not have the correct membership level, they will see the protected content message as specified in the Memberships > Settings > Advanced area of your WordPress admin.
  • When a new member completes checkout, they are automatically enrolled into all courses for their level. If a member changes level, they are also unenrolled from any course that aren’t offered for their level.

Protect LifterLMS Courses

LifterLMS is an e-learning plugin for WordPress that is available for free in the WordPress.org plugin repository. The software includes courses, lessons, quizzes, achievement badges, and more. Our Courses for Membership Add On creates a bridge between the content protections of PMPro and the course functionality of LifterLMS.

LifterLMS includes their own features for course enrollment and course membership. You should use this Add On if you are not using their membership features and instead want PMPro to manage your members and membership registrations. This Add On is specifically written to enroll and unenroll members from the courses available for their level.

This Add On does not include any update scripts to manage enrollment for existing members. All members who have an existing membership level will not be automatically enrolled in a course once you add protection. Course protection and enrollment is hooked in the level change event: only new members or members that cancel or change their level will be updated. You must manually add current members to newly protected courses, and you must manually remove enrolled users that do not have the correct membership level for access.

  • To protect your course, navigate to Memberships > Courses and check the box “LifterLMS” to enable the LifterLMS module. Then, save settings.
  • Now, edit your LifterLMS course and locate the “Require Membership” metabox. Check any memberships levels that you want to allow access for this course. Then, save and update your course.
  • We recommend disabling the Basic and Email Enrollment notifications for students on the LifterLMS > Settings > Notifications page in the WordPress admin. More information about LifterLMS notifications can be found in their documentation.
  • If a user viewing your course does not have the correct membership level, they will see the protected content message as specified in the Memberships > Settings > Advanced area of your WordPress admin.
  • When a new member completes checkout, they are automatically enrolled into all courses for their level. If a member changes level, they are also unenrolled from any course that aren’t offered for their level.

You do not need to set up any LifterLMS Access Plans, registration pages, or other membership related functionality to use this Add On for course protection.


Screenshots

Settings page to enable course modules for built-in CPT, LearnDash, and LifterLMS.
Settings page to enable course modules for built-in CPT, LearnDash, and LifterLMS.
Courses post type screen shows number of lessons and required membership levels.
Courses post type screen shows number of lessons and required membership levels.

Edit a single course to add public overview content, add and reorder lessons, categorize the courese, and add membership requirements.
Edit a single course to add public overview content, add and reorder lessons, categorize the courese, and add membership requirements.
A course page on the site frontend showing overview content, a registration box with required levels, and a list of lessons.
A course page on the site frontend showing overview content, a registration box with required levels, and a list of lessons.

Action and Filter Hooks

Below are the most commonly used action and filter hooks.

apply_filters( 'pmpro_courses_modules', $modules );
apply_filters( 'pmpro_courses_course_redirect_to', null );
apply_filters( 'pmpro_courses_lesson_redirect_to', get_permalink( $post->post_parent ) );
apply_filters( 'pmpro_courses_get_courses_html', $temp_content, $courses );
apply_filters( 'pmpro_courses_get_lessons_html', $temp_content, $course_id, $lessons );
apply_filters( 'pmpro_courses_show_course_content_to_nonmembers', true );