shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

How to show sections in Swift Loading Layouts’ Course Content Table.

As you know, eLumine’s Swift Loading layouts are built using LearnDash’s legacy theme as such the feature of Sections doesn’t show up in the content table.

Following the below steps will help you get these sections to show up in the course content table.

  1. First, you need to override the content table template using the child theme. Refer to this link.
    • To do this, create a “learndash/dynamic/template-parts” directory in your child theme(elumine-child).
    • Copy content-course-table.php from “elumine/learndash/dynamic/template-parts” to the above created directory.
  2. Edit this file, and replace the following code segment
<?php
if ($show_course_content) :
?>
            <!-- Lesson list section - Accordion for course progress -->
            <div class="course-lessons-ld-wrap elumine-ld-content-table" id="lessons_list">
                <?php if ($lessons) : ?>
                    <div id="lesson_heading">
                        <h3>
                            <span>
                                <?php echo LearnDash_Custom_Label::get_label('lessons') ?>
                            </span>
                        </h3>
                    </div> <!--lesson_heading-->

                    <?php foreach ($lessons as $lesson) : ?>
                        <div id="wdm_learndash_lessons" class="wdm_learndash_lessons <?php echo esc_attr($lesson['sample']); ?>">

with

<?php
if ($show_course_content) :
    $sections = learndash_30_get_course_sections($course_id);
?>
            <!-- Lesson list section - Accordion for course progress -->
            <div class="course-lessons-ld-wrap elumine-ld-content-table" id="lessons_list">
                <?php if ($lessons) : ?>
                    <div id="lesson_heading">
                        <h3>
                            <span>
                                <?php echo LearnDash_Custom_Label::get_label('lessons') ?>
                            </span>
                        </h3>
                    </div> <!--lesson_heading-->

                    <?php foreach ($lessons as $lesson) : ?>
                        <?php
                        $lesson_section = !empty($sections[$lesson['post']->ID])?$sections[$lesson['post']->ID]:'';
                        if (!empty($lesson_section)) {
                            echo "<h2 class='elumine-ld-sections'>" . $lesson_section->post_title . "</h2>";
                        }
                        ?>
                        <div id="wdm_learndash_lessons" class="wdm_learndash_lessons <?php echo esc_attr($lesson['sample']); ?>">

3. Now, Sections should be visible on your course pages’ content table. All that’s remaining is to style it.

4. To do this, edit the style.css file from your child theme and add the following code to it.

.elumine-course-buy .elumine-ld-sections {
    font-size: 14px;
    margin: 15px 0;
    transition: all .5s ease-in-out;
    margin-left: 0px;
    padding: 5px 10px;
    display: inline-block;
    width: auto;
    background-color: #f7f7f7;
}
Updated on November 3, 2020
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Was this article helpful?

shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Related Articles