Cannot Enqueue Scripts?
-
Hi all,
I’m attempting to load a javascript file (eventually will be multiple js and css) into the header of the site. As far as I can tell, it should be a simple process of defining a custom function in functions.php and using add_action() to register it?
Here is my code (in functions.php):
function load_scripts_and_styles() { $root = get_theme_root_uri(); $dir = $root . 'evos/js/functions/functions.js'; wp_enqueue_script('functions', $dir); } add_action( 'wp_enqueue_scripts' , 'load_scripts_and_styles' );
I cannot understand why this isn’t working, I would of thought it would be simple or at the least I would get some kind of error?
Thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Cannot Enqueue Scripts?’ is closed to new replies.