In this tutorial, you’ll learn how to restrict LearnPress courses to users enrolled in 2 courses.
It’s a great option to promote a new course or to give your students a free second or third course.
For example, imagine you want to create a free WooCommerce course. But you want to make it a requirement to be enrolled in at least two previous courses. In this case, the restriction parameter would be being enrolled in at least two courses.
It completely differs from LearnPress’s Prerequisite Courses feature because you don’t have to specifically state which courses the student must have taken. Instead of having to complete a course before taking the course restricted, users can take courses simultaneously.
Difficult, expensive, limited solutions
This is something you can only do by programming the conditional restriction or hiring a good programmer to create that conditional restriction for you. Both options are difficult, expensive, and limited.
If you program the conditional restriction, you have to know something about programming. If you hire a programmer, he’ll earn good money and at the end, you’ll have only that conditional restriction available.
Best solution: WordPress Conditional Post Restrictions
With the WordPress Conditional Post Restrictions plugin, you can easily create conditional restrictions for posts, pages, or custom post types such as courses, events, products, downloads, etc.
Here we show you how the restrictions list looks in a post:
It’s important to mention that the plugin works perfectly with any custom post type. Besides, you can use the custom post types as restriction parameters. For example, you can restrict events based on courses, restrict courses based on purchased products, etc.
You have limitless possibilities to manage your content on WordPress by easily applying conditional restrictions.
You can download the plugin here:
Download WordPress Conditional Post Restrictions Plugin - or - Read more
Once you install and activate the plugin, you can proceed to restrict your LearnPress courses to students with a minimum number of enrolled courses by following these steps:
Step 1. Open your list of LearnPress courses
To open the list of LearnPress courses, go to LearnPress > Courses in wp-admin.
Once there, you’ll see all the courses like this:
Step 2. Restrict LearnPress course to students enrolled in at least two courses
In this case, we have language courses, so we’ll edit the Portuguese Course.
Once you open the course you want to restrict to users enrolled in at least two courses, scroll down to the Restriction Rules section of the course editor, and select the following values:
- Enable conditional restrictions: Yes
- What happens when the conditions are met: Allow access
- Condition 1: User enrolled courses count = 2
- Update the course to save the changes.
As you see here, we set 2 as the number of courses users must be enrolled in, in order to access the course we’re restricting. However, you decide how many courses you want to set as an access requirement for this course.
This is how you easily restrict courses to users enrolled in at least two courses. You just need to repeat the steps in other courses.
Optional. Restrict courses to users with a minimum number of enrolled courses, including a specific course
Imagine you want to set a minimum number of enrolled courses as a conditional restriction for a free course. That’s really simple because we’ve already shown you how to do it.
The thing is that the two required courses must include a specific course. For example, students must take the Spanish course plus another of their choice.
In that case, you don’t have to worry anymore because you just need to apply the following condition to your course:
- Enable conditional restrictions: Yes
- What happens when the conditions are met: Allow access
- Condition 1: User enrolled courses count = 2
- Click the + button in the Condition 1 to add an “and” condition.
- Condition 2: User is enrolled to course = Spanish
- Update the course to save the changes.
This is how you easily restrict courses to users enrolled in at least two courses, including a specific course. You just need to repeat the steps in other courses.
What happens when a user tries to access a restricted course?
WordPress Conditional Post Restrictions gives you several options to define what happens when a user tries to access a restricted course. You need to edit the global settings of the plugin.
Go to Settings > Post Restrictions to open the plugin’s global settings and select to whether redirect users to another page or show them a restriction message.
That’s really simple!
You see? You don’t have to program anything nor hire a professional programmer. The WordPress Conditional Post Restrictions plugin allows you to easily add conditional restrictions to your LearnPress courses. It’s really simple and fast!
You can download the plugin here:
Download WordPress Conditional Post Restrictions Plugin - or - Read more