[Resolved] Can't create sections inside of LearnDash LMS

Home Forums Support Can't create sections inside of LearnDash LMS

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1034631
    Sebastian

    Hello,
    Is it currently possible to use Sections inside of LearnDash LMS, and if so how?
    This feature works fine on pages and post, but the option to use sections does not display anywhere inside of LearnDash.
    Thanks!

    #1034671
    Leo
    Staff
    Customer Support
    #1034742
    Sebastian

    Thank you Leo.
    What is a CPT?
    Also – and forgive my ignorance as I’m not a developer – what value am I supposed to use in “yourposttype”?
    Thanks!

    #1034747
    Leo
    Staff
    Customer Support

    CPT is custom post type.

    I’m not sure if LearnDash is using CPT or not – you’d need to check with their support.

    If it is, then you can just replace yourposttype with the name of the CPT name.

    Let me know 🙂

    #1034776
    Sebastian

    Got it

    I just asked my good friend Google and found https://www.learndash.com/support/docs/developers/hooks-and-filters/

    For future reference should anybody be looking for the answer, here it is:

    1. Create a child theme or use the blank one provided at https://docs.generatepress.com/article/using-child-theme/

    2. Update functions.php of that child theme with

    add_filter( ‘generate_sections_post_types’,’generate_add_section_post_types’ );
    function generate_add_section_post_types() {
    return array( ‘page’,’post’,’sfwd-courses’,’sfwd-lessons’,’sfwd-topic’,’sfwd-quiz’ );
    }

    #1034780
    Leo
    Staff
    Customer Support

    Glad you’ve figured out!

    Thanks for sharing the code 🙂

    #1034783
    Sebastian

    Thank you Leo.
    One more question, and it may seem strange at this point.
    What’s the benefit of using Sections?
    Until now I had an aversion to Gutenberg and had disabled it.
    My motivation for making Sections work with LearnDash was to be able to create columns, but Sections – as I just found out – doesn’t do that.
    This led me to explore Gutenberg and start to appreciate what it has to offer.
    Seeing all it can do, I now wonder what the purpose of Sections is. Is it intended for people who don’t like Gutenberg?

    #1034789
    Leo
    Staff
    Customer Support

    Sections came out a long time before Gutenberg was released.

    Before Gutenberg editor there was only text/visual editor in WordPress so section was very useful back then.

    We are working on a new plugin that will basically be a combination of Gutenberg + Sections and offer a lot of users features like columns etc.

    Stay tuned 🙂

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