Best Premium and Free WordPress Themes › Forums › SuperMagPro › Having issues with creating subtheme or enquing any js/css in function.php › Reply To: Having issues with creating subtheme or enquing any js/css in function.php
Hello,
Thank you so much for using our theme SuperMagPro. Some line of code is mistake there. So please use the below code while enqueue style and scripts.
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_script( ‘child-custom-js’, get_stylesheet_directory_uri() . ‘/child-custom.js’, array(‘jquery’), false, ‘1.0.0’ );
}
If you feel any problem, please feel free to ask.
Best Regards,
Acme Supports