Why I am getting double jquery?

Some plugins do not use the recommended method of wp_enqueue_script(), and instead bundle jQuery with the plugin (or use an external version) and load it through dropping a <script> tag into the page head. Really, the only way to fix this is to manually edit the plugin files and remove the duplicate call to jQuery. … Read more

jQuery issue and wp_enqueue_script

Best practise while developing a WordPress theme is to always use the jquery included in WP. So deregister it and use a cdn hosted version should be avoided. This is a required practise, e.g. to include themes in wordpress repository and also some famous themes marketplaces (like themeforest) at this time do not accept themes … Read more

Adding Custom JQuery Menu Fresh Slide Out

In addition to @Wyck’s answer, since you asked if you are doing anything wrong, I’d suggest that it is usually more correct to register and enqueue your scripts as you’ve already done with some scripts in my_custom_function, than it is to write scripts directly into the header. That is, put this code: $(function() { $(‘#menu … Read more

Delete wp_deregister_script(‘jquery’) returns an not shown error

WordPress uses no conflict mode for jQuery but not when you use a cdn link to load jquery file. You should use it something like this: add_action( ‘wp_enqueue_scripts’, ‘load_custom_jquery’); function load_custom_jquery(){ wp_enqueue_script( ‘custom_admin_jquery’, get_stylesheet_directory_uri().’/js/flexslider.js’, ‘jquery’ ); } Just that much is enough. No other registering, deregistering will be required. This code will load your custom-jquery. … Read more

Contact Form 7 submission does not complete [closed]

There is a fatal error in the theme you are using. When I checked the response in firebug console, I got the following error Fatal error: Cannot use object of type WP_Error as array in /home/content/s/b/r/sbrenan/html/peteshighway.com/wp-content/themes/peteshwy/functions.php on line 96 Either you fix this or contact with the theme support team.

Theme now uses require.js and enqueue script no longer works

If the script is there it should work. It’s probably failing because you’re not declaring the jquery dependency and you’re not wrapping it correctly (in no conflict mode). Here’s how your script should be enqueued: function custom_scripts() { wp_enqueue_script( ‘unique-custom-script’, get_stylesheet_directory_uri() . ‘/custom.js’, array(‘jquery’) , false, true ); } add_action( ‘wp_enqueue_scripts’, ‘custom_scripts’, 99 ); And … Read more

How can insert JQuery in WordPress? [closed]

WordPress gets delivered with jQuery. All you have to do is tell your theme to wp_enqueue_script() jQuery: wp_enqueue_script( ‘jquery’ ); This code belongs into your functions.php. Of course, you can also change which version of jQuery should be loaded, and from which ressource, check this thread for further details. Afterwards you can put your jQuery-magic … Read more