I have a simple application I have worked on and would like to load it into my WordPress theme.
This app has a /js folder with myscript.js, a /css folder with mystyle.css and an HTML file index.html.
Here is the fiddle to the whole app.
I am using the default WordPress theme and all I want to do is create a page for this app and load it there. This way I can create another page and load another app.
Efforts made:
From what I have read I need to enqueue my custom JS script which I have done like this and added to functions.php file:
/**
* A small function to load my custom JScript file for WordCount
*/
function my_script() {
if ( is_page(23) ) {
wp_enqueue_script(
'my-script',
get_template_directory_uri() . '/js/my-script.js',
array('jquery')
);
}
}
add_action( 'wp_enqueue_scripts', 'my_script', 1 );
My only challenge is: where would my index.html code go to?