I am trying to convert my html to WordPress.
I have two folders, one is build
folder which consist of:
-index.css
-index.js
-index-style.css
Then on my other folder which called src
:
-index.js
-modules folder
--HeroSlider.js
--GoogleMap.js
I tried to load the HeroSlider.js on my function.js file on my WordPress theme folder like this:
<?php
function school_files(){
wp_enqueue_script('main-school-js', get_theme_file_uri('/src/index.js'), NULL, '1.0', true);
wp_enqueue_style('custom-google-font', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i"');
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"');
wp_enqueue_style('school_main_styles', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'school_files');
But this one did not load my Hero Slider file on my WordPress file. How do I load it so i can make sure the template works?