List LearnDash courses & lessons in a WordPress table

August 7, 2020

List LearnDash courses lessons WordPress plugin

LearnDash is the world’s leading WordPress LMS (Learning Management System) plugin. Keep reading to discover the easy way to list your LearnDash LMS courses and lessons in a searchable, filterable table.

LearnDash is a fantastic WordPress LMS. It makes it easy to create online courses with sophisticated features. And with the LearnDash WooCommerce add-on, you can even sell your courses online!

LearnDash comes with some neat layouts and shortcodes that you can use to display your courses and lessons – either in a grid or as a basic list. However, if you have lots of courses then you might find these slightly limiting. That’s where the Posts Table Pro plugin comes in.

LearnDash lessons list in a table

Keep reading to learn how to list any type of WordPress content in a table:

You can choose what information to display about your courses and lessons, and which courses you want to include. It’s even possible to add filter dropdowns to help students to find particular LearnDash content more easily!

Posts Table Pro
The easy way to list LearnDash courses and lessons in a searchable, sortable table.

Before you start

We’ll need the Posts Table Pro WordPress plugin in order to list courses and lessons from the LearnDash CMS in a table.

  1. Get Posts Table Pro, install it on your WordPress site, and activate your license key on the plugin settings page.
  2. Next, go to Settings > Posts Table Pro and choose the default settings for your tables. (I’ll show you how to override these for individual tables later.)
  3. Now you’re ready to start listing LearnDash courses and lessons!

(I’m assuming that you already have LearnDash set up on your WP site but if not, get it now and add some courses and lessons.)

List LearnDash courses in a table

First, let’s learn how to list any or all of your LearnDash courses in a table. You can add the table to any page on your site, or even to other locations such as sidebar widgets.

  1. Go to the page where you want to list LearnDash courses.
  2. Add the shortcode [posts_table post_type="sfwd-courses"]
  3. Choose your columns, depending on which information you want to display about your courses. Here are some popular columns to get you started:
    • image – the course featured image.
    • title – the main course title.
    • content – the main course description. You can truncate this using the content length option.
    • categories – a list of the course categories.
    • date – the date on which the course was first published.
    • author – the WordPress user who created the course.
    • Check out the full list of available columns. You can add lots of additional columns including custom fields, taxonomies, and more!
  4. List the columns in the shortcode you just created, like this: [posts_table post_type="sfwd-courses" columns="image,title,content,categories"]

If you don’t like editing shortcodes, then you can select the post type and columns on the Posts Table Pro plugin settings page. However, I have used the shortcode method because this allows you to create multiple tables, each one different. For example, you need to do this in order to list courses in one table, and lessons in other tables.

Choosing which courses to display

If you don’t want to list all the courses from your LearnDash LMS, that’s fine too. Use these options to control which courses to list in the table. You can list LearnDash courses by category, ID, date, author, custom field or custom taxonomy values, and more.

An example list of LearnDash courses

Display LearnDash courses table

I used the following shortcode to create this list of LearnDash courses:

[posts_table post_type="sfwd-courses" columns="image,title,categories,date" include="" filters="categories"]

Once you’ve installed Posts Table Pro, the same shortcode will work for you too!

List LearnDash lessons in a table

Next, we’ll learn how to list LearnDash lessons in a table view. This is similar to listing courses, but you need to display the lessons post type instead.

  1. Go to the page where you want to list lessons from the LearnDash LMS.
  2. Add the shortcode [posts_table post_type="sfwd-lessons"]
  3. Choose your columns, depending on which information you want to display about each lesson. Here are some popular columns to get you started:
    • image – the lesson’s featured image.
    • title – the LearnDash lesson title.
    • content – the lesson content. You can truncate this using the content length option.
    • categories – a list of the categories that each lesson is in.
    • date – the date when the lesson was first published.
    • author – the WordPress user who created the lesson.
    • Check out the full list of available columns. You can add lots of additional columns including custom fields, taxonomies, and more!
  4. List the columns in the shortcode you just created for example: [posts_table post_type="sfwd-lessons" columns="image,title,content,categories"]

Choosing which lessons to display

Normally, you would want to create separate tables listing the lessons from each course, instead of including the lessons from all courses in a single table.

The easiest way to do this is to use the ‘include’ option in Posts Table Pro to enter the ID’s of the lessons that you want to list. For example:

[posts_table post_type="sfwd-lessons" include="001,002,003"]

There are also lots of other ways to choose which lessons to display. For example, you can list LearnDash lessons by category, tag, date, and more. Read about all the options here.

An example list of LearnDash lessons

List LearnDash lessons in a table

I used this shortcode to create the above list of LearnDash lessons:

[posts_table post_type="sfwd-lessons" columns="image,title,author,date" include="59015,59021,59016,59017,59018,59019,59020" filters="categories"]

If you’ve installed Posts Table Pro, then the shortcode will work for you too! (Just replace the ID’s with the ID’s of the LearnDash lessons that you want to list.)

Sell LearnDash courses with WooCommerce and WooCommerce Product Table

Sell LearnDash courses product table WooCommerce

Lots of LearnDash LMS websites like to take payment for courses. The student pays for a course online, and then receives instant access to the course and all its lessons, quizzes etc.

The LearnDash WooCommerce plugin provides an excellent way to do this. You install WooCommerce to provide the e-commerce and payment features, create a new product, select the ‘Course’ product type, and choose which course the student will be enrolled on when they buy the product.

The problem with this plugin is that your course products are listed in a standard store layout, which isn’t really designed for selling courses! Each course product is displayed with a large image, and very little information about the course. It’s difficult to compare courses alongside one another, and students have to scroll down a long way to see the different courses. Compare the two screenshots below:

As you can see, the table layout on the right is a much better way to display courses. If you want to display course images then you can add small thumbnails to the table, but there’s no need for such huge images. It’s better to show more products within a smaller amount of space, along with extra information about each course. You can also add quick filters and a search box to help people to find courses more easily, for example by category.

You can achieve all this by using the LearnDash WooCommerce plugin with the WooCommerce Product Table plugin. And if you like the quick view buttons in the screenshot above, then you’ll need the WooCommerce Quick View Pro plugin too. I’ll tell you how to set all this up next.

Listing LearnDash products with WooCommerce Product Table

  1. Set up LearnDash, add some courses, and then use the WooCommerce Integration add-on to create some course products.
  2. If you’ll be using WooCommerce Product Table to sell other types of products as well as courses, create a category for your course products.
  3. Install WooCommerce Product Table.
  4. Go to WooCommerce → Settings → Products → Product Tables and choose the settings for your tables. In particular, choose which columns you want to include, and add filters to help people to buy specific courses more easily.
  5. Create a new page, which you’ll use to list your LearnDash course products.
  6. Add the shortcode: [product_table category="courses"]. Replace ‘courses‘ with the slug of the product category you want to display, or if you’re not using categories then just use [product_table]).

This will create a searchable table listing the LearnDash courses that you have added as WooCommerce products. It’s perfect if you want to create a one-page order form for signing up to your courses. Students can select the courses they want to sign up to (either using the add to cart buttons or quick-select checkboxes) and pay for them all using the WooCommerce checkout.

WooCommerce Product Table
The easiest and most flexible way to sell LearnDash products from a quick one-page enrolment form.

Add quick view buttons

Normally, students have to click on the product title to learn more about the course and read the full description. You can speed up the process by installing WooCommerce Quick View Pro.

This handy plugin lets you add ‘quick view’ buttons to the product table. Potential students can use these to learn more about each course from a quick view lightbox popup. That’s much faster than having to visit a separate page for each product. It also keeps them on the list of courses, which encourages them to sign up for multiple courses at once.

WooCommerce Quick View
Add quick view buttons to your list of LearnDash courses for sale.

Once you’ve installed WooCommerce Quick View Pro, simply add quick-view to your list of columns on the WooCommerce Product Table settings page. For example, your list of columns might now be: image,name,quick-view,add-to-cart

List WordPress forums

bbPress forum list replies

LearnDash integrates with the bbPress forum plugin, which is ideal if you want to provide discussion forums for your LMS courses.

If you’d like to list these in a table, instead of using the standard bbPress forum layouts, then check out our other tutorial. This provides full instructions on how to use Posts Table Pro to list your LearnDash forums and discussion topics in a table.

Display LearnDash quizzes in a table

List LearnDash Quizzes WordPress plugin

It’s also possible to list LearnDash quizzes in a table. To do this, install LearnDash and Posts Table Pro (as described above) and use the following shortcode:

[posts_table post_type="sfwd-quiz" columns="title,content"]

Use the include option to choose which quizzes to show. For example, if you wanted to list quizzes for a specific course only (e.g. on the course homepage), then you would add the ID’s for all the quizzes for that course.

Displaying other LearnDash data in a table

So far, we’ve looked at how to display LearnDash courses, lessons, forums, quizzes and WooCommerce course products in a searchable table view. LearnDash also comes with other post types such as groups (groups) and assignments (sfwd-assignment) which you can list in a table.

To list other LearnDash post types, either select the post type on the Posts Table Pro settings page, or directly in the shortcode. For example: [posts_table post_type="sfwd-assignment"].

Where to get the plugins

As you can see, Posts Table Pro offers the perfect way to list LearnDash courses, lessons, forums and quizzes in a more searchable, interactive format. It’s an excellent way to engage potential students and encourage them to take more courses.

Posts Table Pro
The easy way to list LearnDash courses and lessons in a searchable, sortable table.

Or if you want to list WooCommerce course products, then you can do this with WooCommerce Product Table and WooCommerce Quick View Pro.

Together, these plugins provide the perfect solution to listing any type of LearnDash data in a table. Get them today, and start listing your LearnDash content in new and better ways!

Katie Keith

An active member of the global WordPress community, Barn2 Co-Founder Katie loves collaborating with other plugin companies. Her articles have been published on high profile sites including WPTavern, Torque and IndieHackers. She oversees all plugin support and deals with 'Tier 2' support requests about how to use Barn2's plugins in advanced ways.

Please share your thoughts...

Your email address will not be published.