Skip to content

Course grid shortcode and block ([moderncourses])

Reign LearnDash Addon overviewPremiumGet Reign LearnDash Addon →

Also called: course grid shortcode, show courses on a page, courses block, course list shortcode, filter courses by category, free courses, my courses

[modern_courses] prints a course grid with the add-on cards and filter bar. The Courses grid block uses the same code.

  1. Edit a page and add a Shortcode block.
  2. Enter the shortcode with the options you want:
[modern_courses template="classic" columns="3" per_page="12" category="design"]
  1. Click Update.
  1. Add Courses grid from the Widgets category.
  2. In the side panel, set Template, Per page, Columns, Category, Show filters, Show search, Show reviews and Pagination. It uses the same options as the shortcode.
Attribute Default Description
template Your archive layout reign, classic, soft or catalog. reign draws the theme’s course card (with the Reign theme and LearnDash’s LD30 templates; otherwise classic).
per_page 12 Courses per page. 1 to 48.
columns 3 Columns. 1 to 4.
view grid grid or list. catalog defaults to list.
category empty Course category slugs or IDs, comma separated.
tag empty Course tag slugs or IDs, comma separated.
course_ids empty Show only these course IDs, comma separated.
instructor empty Author user IDs, comma separated.
price_type empty free or paid.
enrolled empty yes for the logged-in user’s courses. no for the rest. Needs a logged-in user.
orderby date date, title, menu_order, comment_count or rand.
order DESC ASC or DESC.
show_filters yes no hides the whole filter bar.
show_search yes no hides the search field.
show_sorting yes no hides the sort menu.
show_progress yes no hides student progress on cards.
show_reviews yes no hides ratings on cards.
pagination yes no hides page links.
empty built-in text Text when nothing matches.
page_arg empty Page by ?name=2 instead of /page/2/. Use it inside BuddyPress screens.
as_visitor no yes draws every card as a visitor sees it: the price and button, with no status or progress. The profile Courses tab uses it on other members’ profiles.

The page shows a grid of course cards, with the filter bar above it unless you hid it.

The settings still decide which cards show and which filter fields appear. These options only remove items.

How do visitor filters mix with my options?

Section titled “How do visitor filters mix with my options?”

A visitor’s filter choice narrows the shortcode’s own category, tag, instructor and price_type. This works only for fields in the filter bar.

Yes. The 5.1.0 names still work: template="minimal" is soft, and premium and detailed are classic.

Visitor choices go in the page address. These are the names:

  • rld_q for search, rld_cat, rld_tag and rld_by (instructor ID).
  • rld_price (free or paid) and rld_view (grid or list).
  • rld_sort (newest, title or reviews).