• Resolved d3d5x1

    (@deraxia)


    Thank you for sharing and maintaining such a great plugin.

    I have a problem and a question:

    Problem: On the Analysis page, if I click on a Learner, it simply says “Invalid User”. Using the latest Sensei LMS on WP 5.8.

    Question: Sensei LMS uses the narrow single template on the default Twenty Twenty theme. I don’t see any option to change the page template to full width. Would this be possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Cena (a11n)

    (@cena)

    Hi @deraxia ,

    > On the Analysis page, if I click on a Learner, it simply says “Invalid User”. Using the latest Sensei LMS on WP 5.8.

    Interesting! I did some testing, and the only way I can trigger this message is if a user exists in WP Admin-> Users but is NOT enrolled in any courses.

    It turns out this is a known issue, and you can follow this thread for updates:

    https://github.com/Automattic/sensei/issues/3166

    > Sensei LMS uses the narrow single template on the default Twenty Twenty theme

    I’m not quite sure what you mean by this – can you clarify?

    In the meantime, have you seen: https://senseilms.com/documentation/theming/ ?

    Best,

    Thread Starter d3d5x1

    (@deraxia)

    Thanks for the quick reply. I searched here for that invalid user issue, but didn’t think to check GitHub.

    For the theme issue, Twenty Twenty has a few page templates. The default template, which seems to be what Sensei LMS uses, has a very narrow width. This makes the course and lesson look a bit awkward. Just wondering if there’s an easy way to use the full width page template included with Twenty Twenty. In Gutenburg, I don’t see the page template selection option which would be there if I were editing a regular page or post.

    I have looked at the documentation on theming, and am sure I could figure a workaround for this, but was thinking I might be missing something here.

    • This reply was modified 3 months, 3 weeks ago by d3d5x1.
    Thread Starter d3d5x1

    (@deraxia)

    As a workaround, I widened the Sensei pages using this:

    body.sensei .entry-content>*:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide){max-width:87rem;width:calc(100% - 8rem)}

    Something I can’t fix with CSS is that the module archive pages and the course overview page are output without any styling or structure. The content is just output as a single string, and doesn’t have any divs.

    https://i.postimg.cc/VNqwT0Qh/abc.png

    The module pages and course overview pages aren’t mentioned in the documentation:
    https://senseilms.com/documentation/theming/

    Plugin Support Cena (a11n)

    (@cena)

    Hi @deraxia ,

    Just a quick note here to let you know I haven’t forgotten about this!

    I’ve asked our developers to take a look at this thread, and hopefully will have more information for you soon.

    Best,
    Cena

    Plugin Support Cena (a11n)

    (@cena)

    Hi @deraxia ,

    If you look at the files in the templates directory of Twenty Twenty, you can see that the custom templates have a Template Post Type parameter in the doc comment which are set to post, page. This is why the templates do not show up for other post types, such as course or lesson.

    This snippet worked on my test site to make those templates available for Courses and Lessons:

    
    
    function add_twenty_twenty_custom_templates( $post_templates ) {
    	$post_templates[ "templates/template-full-width.php" ] = "Full Width Template";
    	$post_templates[ "templates/template-cover.php" ] = "Cover Template";
    	return $post_templates;
    }
    
    add_filter( "theme_course_templates", 'add_twenty_twenty_custom_templates' );
    add_filter( "theme_lesson_templates", 'add_twenty_twenty_custom_templates' );

    Best,
    Cena

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.