The Lesson/Topic Grid module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. It’s much like the Enhanced Course Grid module, except that it displays lessons or topics instead of courses.
Block Name: Enhanced Lesson/Topic Grid
The lesson/topic grid can be added to any page to display a grid of lessons or topics. If the shortcode/block is added to a course page, it will automatically display the lessons in that course. Similarly if the shortcode/block is added to a lesson page, it will automatically display the topics in that lesson. With no additional parameters, it will display a 2-column grid of lessons/topics (featured images of equal sizes should be added to lessons/topics). Dripped lessons that are not yet available will display their availability date.
Use of the shortcode/block on a course or lesson page will hide any quizzes associated with that lesson or topic. You will need to manually link to any associated quizzes. Note: If the grid is enabled globally on all lessons and/or topics (see below), the quiz table will still be displayed.
Enabling globally on all lessons and/or topics
If you want to show a grid of lessons and/or topics on all course and lesson pages, the grid can be enabled globally from the module settings box.
The [uo_lessons_topics] shortcode includes a few attributes to keep things as flexible as possible. Here’s a list of the attributes that are currently available:
|Attribute Name||Description||Attribute Values||Default Value|
|course_id||Specify a course ID to display lessons from; attribute is required if the shortcode is not placed on a course page. Cannot be used with lesson_id||any course ID||If placed on a course page, the ID of that course|
|lesson_id||Specify a lesson ID to display topics from; cannot be used with course_id. Can only be used on LearnDash pages; topic grid is not supported on non-LearnDash pages.||any lesson ID||If placed on a lesson page, the ID of that lesson|
|cols||Sets the number of columns to display per row.||"2", "3", "4", or "5"||"2"|
|show_image||Controls whether or not course featured images are displayed. If no featured images are set for courses, this should be "no". Note when uploading a featured image, WordPress will automatically crop it to 1.33:1 aspect ratio. The image you upload should be at least 624 x 468 pixels. Note that there is a global setting to enable images, so if no images are showing in your grid, make sure images aren't turned off in the module settings.||"yes" or "no"||"yes"|
|border_hover||Changes the border colour of grid items when they are hovered over.|
Using CSS to Customize the Lesson/Topic Grid
You can customize the grid layout directly in a CSS file rather than using shortcodes by copying the following file:
Move it to your child theme so that it’s available at:
Overriding the Lesson/Topic Grid template
Update: As of Uncanny LearnDash Toolkit Pro version 3.1, you can edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /uncanny-toolkit/, keeping the same file structure but removing the /templates/ subdirectory.
For example, to override the lesson/topic grid template, copy:
The copied file will now override the default template in the Uncanny Toolkit.
Warning: Do not edit these files within the the Uncanny Toolkit plugin itself, as they are overwritten during the upgrade process and any customizations will be lost.