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

JS file not loading [closed]

You forgot to set dependencies at third parameter put it with array() or array(‘jquery’) if you want to depend on jQuery wp_register_script( ‘navbar-scroll’, ‘http://www.classyclutter.net/wp-content/themes/foodiepro/assets/js/scrolling-navbar.js’, array(), ‘1.0.0’, true);