I have some trouble making wp_enqueue_script and wp_enqueue_style work..
In the begining of functions.php file, I added this function :
<?php
require_once ....
[....]
add_action('wp_enqueue_scripts', 'my_enqueueScripts');
function my_enqueueScripts(){
wp_register_script('my_js_script', get_template_directory_uri().'/myDirectory/my_js.js', array('jquery'), '1.0', true);
wp_enqueue_scripts('my_js_script');
wp_register_style('my_css_script', get_template_directory_uri().'/myDirectory/my_css.css', false, '1.0', 'all');
wp_enqueue_style('my_css_script');
}
[....]
<?php
This does not work... My scripts are not loaded and they are not in the "sources" files of my website page...
I tried to put my css file in templates/thetemplate/css/ and my js file on in templates/thetemplate/js/ but this does not solved the problem.
In the template header.php file, the wp_head(); call is here. And in the footer.php file, the wp_footer(); is also here.
I don't know how to make this work....Do I miss something ?
Thanks in advance for your help...
my_enqueueScripts
is actually getting called? – FluffyKitten