Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Unenrolled Course Shortcode
The code snippet registers a new shortcode: [mpcs-unenrolled-courses]. Adding this shortcode will display an unordered list of the logged-in user’s unenrolled courses.
The list will show the titles of all unenrolled courses for the logged-in user, with each title linked to the matching course.
To show only the list of course titles, update the code by removing the "" part of the code on these lines:
$content .= '' . $course->post_title . '';
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments