LearnDash includes a shortcode and block to display a list or grid of available courses. This recipe demonstrates how to filter the courses included in the output of the [ld_course_list] shortcode to only show those courses the member can enroll in. This includes courses they are already enrolled in as well as courses that are restricted for their membership level.

Filtered course list for member's available courses

Plugins Required

This setup requires three separate plugins and a code recipe I’m including below:

The Code Recipe

Adding the recipe to your website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

Once the recipe is installed, place the [ld_course_list] shortcode on the site, maybe as part of the Membership Account page or on the unique homepage created for their level, which will help your members easily access the content that is available to them as part of membership.

If all of your courses require membership, the output of this shortcode may be empty for a visitor or logged in non-member. You can place the shortcode below the excerpt on a page that is restricted to members only to avoid this behavior or you can use either the membership shortcode or the LearnDash visitor shortcode to show specific content to the public.

This recipe requires the Paid Memberships Pro Integration for LearnDash.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?