Load jQuery in functions.php
Hi I am having an issue loading my jQuery via the functions.php file.
- if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
- function my_jquery_enqueue() {
- wp_deregister_script('jquery');
- wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js", false, null);
- wp_enqueue_script('jquery');
- }
Above is the code I have, all plugin's are switched off apart from the plugin giving the issue which is Gravity Forms Stripe. When I click pay on the form:
appears.
I have removed all jquery from the head and this is how I know the jquery is not being loaded from the functions.php file.
I have also tried:
- function my_scripts_method() {
- wp_enqueue_script( 'jquery' );
- }
-
- add_action('wp_enqueue_scripts', 'my_scripts_method');
in the functions.php file, as apparently wordpress has jquery build...this didn't work.
I also tried:
- <?php wp_enqueue_script('jquery'); ?>
alas this did not work either.
Any ideas???