Thank you @saurabhshukla for taking the time to write such an extensive reply.
I kept working on this since my post and what I end up doing is:
– create child-theme/loop-templates/content-course.php and child-theme/loop-templates/content-lesson.php
<?php
/**
* Partial template for content in single-course.php
*
* @package understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="container">
<div class="row">
<div class="col-8 mx-auto pb-3">
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
</div>
</div>
</div>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
– create a single-course.php and single-lesson.php with the code from the understrap sidebar right template.
<?php
/**
* Template Name: Right Sidebar Layout
*
* This template can be used to override the default template and sidebar setup
*
* @package understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<div
class="<?php if ( is_active_sidebar( 'right-sidebar' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area"
id="primary">
<main class="site-main" id="main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop-templates/content', 'course' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #page-wrapper -->
<?php get_footer(); ?>
then in the Guttenberg editor
for each course
<!– wp:llms/course-information /–>
<!– wp:llms/pricing-table /–>
<!– wp:llms/course-progress –>
<div class=”wp-block-llms-course-progress”>[lifterlms_course_progress]</div>
<!– /wp:llms/course-progress –>
<!– wp:llms/course-continue-button –>
<div class=”wp-block-llms-course-continue-button” style=”text-align:center”>[lifterlms_course_continue_button]</div>
<!– /wp:llms/course-continue-button –>
<!– wp:llms/course-syllabus /–>
for each lesson
<!– wp:llms/lesson-progression /–>
<!– wp:llms/lesson-navigation /–>
It seems to work, the courses and lessons are showing with the sidebar.
There is only something a bit weird about the button “mark as complete” displaying below the lesson video.
When I’m logged in, the button is showing whether I’m seeing the page as myself, a visitor or a student, however, when I logout and view the lesson page the button isn’t displaying but there’s a message “No HTML was returned.“
I will take the time to dig into your reply as it seems that the solution you describe is different from what I have done.
Do you think that the way I found is a viable option?