How to enqueue stylesheets in child-theme functions.php?

Question

I know this topic is old hat, but I still got issues with that.
I use the elementor child-theme and try to enqueue the following stylesheets

  1. hello-child-theme-folder: style.css
  2. hello-child-theme/assets/css: style.css
function hello_elementor_child_enqueue_scripts() {
            wp_enqueue_style( 'hello-elementor-child-style', get_stylesheet_directory_uri() . '/style.css', ['hello-elementor-theme-style',],'1.0.0');
            wp_register_style( 'test', get_template_directory_uri() . '/assets/css/style.css' );
            wp_enqueue_style( 'test' ); 
        }
add_action( 'wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts' );

I tried several other ways like described here: How Can I Use A Child Theme Effectively When Parent's CSS Is Located in a 'CSS folder'?

If I use this standard, my page gets blank:

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
0
Chrizzly 2 months 0 Answers 14 views 0

Leave an answer