• Resolved konigrot

    (@konigrot)


    Hi there! Following the documentation, I have copied the ‘single-lesson.php’ file from the sensei plugin directory, into the active theme /sensei/ subfolder to start customising it. However, before any changes have been made (the file has been copied into /sensei/ but not edited) the html markup changes on the individual lesson pages, like this (courtesy of diffchecker):

    ‘<article class=”lesson post post-30096 type-lesson status-publish hentry module-module-1-leading-lasting-change-transformation-in-disruption-digital-vuca”>’ is removed
    ‘<section class=”entry fix”>’ is removed
    ‘</section>’ closing section tag is removed
    ‘</article>’ closing article tag is removed

    Why/how can this be happening? When the file override is happening from within the them /sensei/ folder, what is likely to be detecting such an override and changing the html as described?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there!

    There is also a content-lesson.php template that contains that markup, it’s likely that Sensei is not loading that file but uses the theme’s content template.

    Themes can also declare support for Sensei (add_theme_support( 'sensei' );), which stops it from loading its own templates via Sensei_Unsupported_Themes.

    Thread Starter konigrot

    (@konigrot)

    Not sure I understood your reply properly!

    I have now added the theme support code to the functions file, but I still have the issue that copying the single-lesson.php file from the sensei plugin directory into the theme/sensei/ folder causes the html to change as described above.

    I have copied the content-lesson.php file into the theme/sensei/ folder and that seems all fine, but it doesn’t sort the issue with single-lesson.php.

    Why would copying this single-lesson.php file be causing this?

    Hello,

    apologies, I misunderstood the role of content-lesson.php, that’s only used for listing pages, not the single lesson page.

    I’ve tried out what you are doing and the markup didn’t change for me, the template only affects the content. Are you sure you don’t have a single-lesson.php in the main theme folder, outside the /sensei/ directory? That would explain why the theme’s singular template is being replaced.

    Thread Starter konigrot

    (@konigrot)

    The only files in the active child theme directory, outside the /sensei/ folder, with a similar name, are single.php and single-magazine.php.

    Lmk if you need access to the site to diagnose.

    Could you look for what template in your theme is providing the original markup?
    Should be something like <article <?php post_class( ); ?>>, but the ‘entry fix’ class could be easy to find too.

    If nothing works, you can also just add that markup to single-lesson or an other template yourself that’s being loaded.

    Plugin Support Jay

    (@bluejay77)

    Hi there,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Template Customisation Issue’ is closed to new replies.