Register Another Stylesheet for MemberPress Courses Add-on With a Child Theme

[ad_1]

Hey everyone,
I am using a child theme for Twenty Twenty One, the MemberPress Courses Add-on, and I am trying to register and enqueue a stylesheet for that Add-on.

This is how I registered and enqueued this new stylesheet

// Stylesheet for MemberPress Classroom
function ly_register_classroom_style(){
    wp_register_style( 'ly-classroom-style', get_stylesheet_directory_uri() . 'assets/css/ly-memberpress-style.css' );
    wp_enqueue_style( 'ly-classroom-style',
        get_stylesheet_directory_uri() . 'assets/css/ly-memberpress-style.css',
        array( 'child-style' ),
        wp_get_theme()->get('Version')           
                    );
}
add_action( 'wp_enqueue_scripts', 'ly_register_classroom_style' );

And this is the filter I added below, provided by MemberPress support

add_filter('mpcs_classroom_style_handles', 
    function($allowed_handles){
        $allowed_handles[] = 'ly-classroom-style';
    return $allowed_handles;
}
          );

It’s not working…
What am I missing? What am I doing wrong?
Thank you so much in advanced!

PS: If I add the CSS in the customizer, my style is applied. But I wrote so many lines that I’d like to have this on a separate stylesheet

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer