wp_enqueue_scripts is for the frontend if I’m not mistaked…
I think you would be after
http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
Thanks for replying… I am not sure I get you entirely…
From my understating… I coded wp_enqueue_script inside function.php in order to get my theme to recognize Javascript. However, I don’t think its problem with my theme… It has to do with WP admin because I tried with several theme that have Javascript coded. none of them are working.
So more likely WP Admin is the culprit.
aplogies, I misread your OP, and thought you were looking to brings scripts specifically into the admin side of things.
http://codex.wordpress.org/Function_Reference/wp_register_script
possibly register the scrpit prior to enqueue?
ALso, I see you add_action – mytheme_scripts_function, but I don’t see where you define it… what is inside that function?
Or did you mean to regsiter and enqueue your scripts within that function?
Here let me rephrase… I have registered and define WP_enqueue in function.php. and here’s the code
add_action('wp_enqueue_scripts','ALP-scripts_function');
function ALP-scripts_function() {
//theme options
global $options;
wp_enqueue_script('jquery');
// js
wp_enqueue_script('hover', get_template_directory_uri() . '/asset/js/jquery.hoverIntent.minified.js');
}
}
?>
But this isn’t problem I am looking at because this code works perfectly on my localhost wordpress admin before I export it to live site.
When I returning back to localhost wordpress Admin, working on same theme again, the Javascript on theme doesn’t load up, I confirmed by switching another free theme with javascript by other developer. They don’t work either.
So the culprit is WordPress on localhost that is not detecting or loading javascript at all and I was hoping someone or you know the solution to it?