I’m trying to enable a lightbox gallery plugin on my website along with a sliding menu and fading functions.
When I load JQuery in the HTML head with tags, the sliding menu and fading functions work fine. No Jquery WordPress plugins are working though.
When I comment out the script tags in the HTML head and try and load JQuery from the functions.php file, JQuery will not load. Here is the code I am using:
<?php
function my_scripts_method() {
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
?>
I have tested several WordPress plugins that require JQuery and none seem to work, no matter what way I try and load JQuery.
JQuery is already registered in wordpress so you just need to enqueue it. Try changing your code to this: