Enqueue style not working

Okay. I have the following in my child themes functions

function hh_load_scripts() {
wp_enqueue_style( 'learndash-custom', get_template_directory_uri() . '/learndash_template_style.css' );
wp_enqueue_style( 'learndash-quiz-custom', get_template_directory_uri() . '/learndash_quiz_front.css' );
wp_enqueue_style( 'custom-style1', get_template_directory_uri() . '/style1.css' );
}
add_action( 'wp_enqueue_scripts', 'hh_load_scripts' );

But it seems to be loading the parents (Pro) theme directory resulting in a 404.

Ideas anyone?

Hello There,

Thanks for posting in! Since all your css stylesheet is in your child theme’s folder, please replace get_template_directory_uri() with get_stylesheet_directory_uri().

Hope this helps. Please let us know how it goes.

:stuck_out_tongue: Your so smart!

Hey There,

We are just glad we were able to help you out.
Thanks for letting us know that it has worked for you.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.