• Resolved Vitzkrieg

    (@vitzkrieg)


    I am needing to move jQuery to the footer for a website and it’s causing an errory in stick.js: “Uncaught ReferenceError: jQuery is not defined”. How can I also have the JS for this plugin load in the footer after jQuery?

    The code I am using to move jQuery is:

    	remove_action('wp_head', 'wp_print_scripts');
    	remove_action('wp_head', 'wp_print_head_scripts', 9);
    	remove_action('wp_head', 'wp_enqueue_scripts', 1);
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Vitzkrieg

    (@vitzkrieg)

    Found a fix:

    
    	wp_dequeue_script( 'advanced-ads-sticky-footer-js' );
    	wp_enqueue_script( 'advanced-ads-sticky-footer-js', false, array('jquery'), false, true);
    
    Plugin Support Henning

    (@henningaa)

    Hi Dustin,

    Thanks for reaching out.

    Great you found a solution for your request, and thanks for sharing the fix as well.

    If you have further questions regarding Advanced Ads, please don’t hesitate to open up a new thread.

    Best regards,
    Henning

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move sticky.js to footer’ is closed to new replies.