Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Error mediaelementplayer with jquery 3.2.1 in file function.php themes

Discussion in 'Misc WordPress Requests' started by Steve Stern, Jan 12, 2018.

  1. Steve Stern

    Guest

    Reply To: Error mediaelementplayer with jquery 3.2.1 in file function.php themes, by Steve Stern

    Do not load jquery that way.

    The proper way to load jquery is to use wp_enqueue_scripts(): https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    Remove the code you have and replace it with:

    function mysite_scripts() {
    wp_enqueue_script( 'jquery' );
    }
    add_action( 'wp_enqueue_scripts', 'mysite_scripts' );

    if you have additional scripts to load, put them in .js files and use additional calls to wp_enqueue_script() to load them.

    Reply To: Error mediaelementplayer with jquery 3.2.1 in file function.php themes
     
    #1

Share This Page

Monarch Social Sharing Plugin