We would like to provide video courses for VIP and Premium members on our membership site. VIP and Premium members are users who paid for memberships and can be distinguished from other users by the custom roles we created using the Toolset Access plugin.
VIP and Premium members will have the following:
- Access to single video pages
- Access to different lists of videos (featured videos, recent videos, etc.)
Here’s how users with and without privileges will see posts with videos:
For each video, we would like to store the following information:
- Title of video
- Short description of video
- URL of video
- Length of video
- Category of video
- Level of difficulty (basic, medium, or advanced)
- Is featured
- A list of related videos
Here’s how we’ll approach the task:
- Use a Custom Post Type with custom fields to store your video courses.
- Restrict read access to this Custom Post Type using the Toolset Access plugin.
- Design custom templates for single video pages and lists of videos.
- Restrict access to a direct URL for the video (to prevent a link to a video from being shared with a friend who is not a member)
Step 1: Separating video courses using a Custom Post Type (CPT)
- Go to Toolset -> Dashboard and add a new Post Type. Then, give it a name, e.g., Video courses.
- On the Toolset dashboard, create a Field Group for the Video courses CPT. Then, add the following fields:
- Video short description
- Video URL
- Video length
- Featured (checkbox)
- On the Toolset dashboard, add two taxonomies for the Video courses CPT:
- Video category
- Level of difficulty
Step 2: Restricting read access to the Video courses CPT
- Go to Toolset -> Access Control and select the Post Type tab.
- Locate the Video course CPT section and click on it to make it expand.
- Check the Manage with Access field.
- Locate the Read column and uncheck the roles you would like to exclude from reading these posts. In our case, these would be Guest and Subscribers.
- Make sure that the Premium member and VIP member roles are checked in the Read column.
- Use the edit pencil icon next to the Read column heading to set what will be seen by users without permission.
Step 3: Design custom templates for single video pages and lists of videos
- Use the Content Template feature of the Toolset Views plugin to create your custom templates for single video pages.
- Use the Toolset Views plugin to create some Views listing your featured, recent, and related videos. Then, insert your Views on the page(s).
- Use the Post Group feature of the Toolset Access plugin to restrict access to these pages to VIP and Premium members only.
Step 4: Restricting access to video links
Since both the Video courses custom post type and pages displaying Views based on this CPT are now controlled using the Toolset Access plugin, only members with privileges will see the posts with videos.
The final task is restricting access to the actual videos to ensure that people can only watch them from your site. Some video hosting services allow you to restrict the playback of videos based on where they are embedded. This prevents people from freely sharing the URL of a video (and being able to play it on their site).
You can achieve this using Vimeo (pro).
Restricting a Vimeo video to a specific website
- Obtain a Vimeo Pro account (or an account on any other video hosting platform that makes it possible to restrict access to a specific domain).
- Upload your video to your Vimeo account.
- Using the “Where can this video be embedded” option, select “Hide this video from Vimeo.com.”
- Using the “Where can this video be embedded” option, select “Only on sites I choose” and enter your WordPress site’s URL. This option restricts video embedding to your domain.
- Copy the code of the embedded version of the video.
- Create a new post for the Video course CPT.
- Paste the Vimeo embedded code in the video’s URL field.
- Publish your post.
Now, you’re fully covered. You’ve restricted access to the pages that hold the video tutorials and you’ve set your videos to only play on these pages.
If you have any questions please not hesitate to post them on the Memebership Sites support page