1. Home
  2. Knowledge Base
  3. Uncanny LearnDash Toolkit Pro
  4. Enhanced Lesson/Topic Grid

Overview

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.

Shortcode/Block

[uo_lessons_topics_grid]

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.

Attributes

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 NameDescriptionAttribute ValuesDefault Value
course_idSpecify 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_idany course IDIf placed on a course page, the ID of that course
lesson_idSpecify 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 IDIf placed on a lesson page, the ID of that lesson
categorySpecify a lesson/topic category to display lessons/topics from that category only. Cannot be used with tag attributeany category slug"all"
tagSpecify a lesson/topic tag to display lessons/topics with that tag only. Cannot be used with category attributeany tag slug"all"
colsSets the number of columns to display per row."2", "3", "4", or "5""2"
show_imageControls 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_hoverChanges 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:
/wp-content/plugins/uncanny-toolkit-pro/src/assets/frontend/css/lesson-topic-grid-view.css

Move it to your child theme so that it’s available at:
/wp-content/themes/your-theme/uncanny-toolkit-pro/css/lesson-topic-grid-view.css

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:

wp-content/plugins/uncanny-toolkit-pro/src/templates/lesson-topic-grid.php
to
wp-content/themes/yourtheme/uncanny-toolkit/lesson-topic-grid.php

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.

Was this article helpful?

0 replies

Comments/Questions

Please note that this is not an official support channel and questions/comments may go unanswered.
To request support, log in to your account and click Submit a Request.

Leave a Reply

Your email address will not be published. Required fields are marked *