• Resolved Apple.R

    (@red-apple)


    Hi,

    Is it possible to move the script from the header to the footer. Basically, all JS files of AddToAny plugin can move to the footer of the page. ??

    Thanks,
    Apple

    • This topic was modified 1 year, 1 month ago by Apple.R.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author micropat

    (@micropat)

    Hi Apple,

    Yep, you can move AddToAny’s script(s) to the footer manually like so:

    // Move AddToAny script(s) to footer.
    add_action( 'wp_enqueue_scripts', function() {
        // AddToAny's main script.
        wp_register_script( 'addtoany-core', false, array(), false, true );
        // AddToAny plugin's jQuery script.
        wp_register_script( 'addtoany-jquery', false, array( 'jquery' ), false, true );
    }, 21);

    Thread Starter Apple.R

    (@red-apple)

    Thank you for a quick reply ?? The code is working!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘move the script to the footer’ is closed to new replies.