• Resolved royromviel

    (@royromviel)


    Hey,

    I have a problem. The media uploader in the Admin section isnt working anymore. I use a custom made theme.
    When I activate Twentyeleven theme it works.
    When I remove the jquery_latest function (see code below) in my custom theme is also works.
    But then my jquery scripts in de frontend don’t work anymore.
    How can I solve this?

    function jquery_latest() {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', 'https://code.jquery.com/jquery-latest.js');
        wp_enqueue_script( 'jquery' );
    }
    add_action('init', 'jquery_latest');
Viewing 1 replies (of 1 total)
  • Thread Starter royromviel

    (@royromviel)

    I have fixed it.

    Using init at add_action is wrong:
    add_action('init', 'jquery_latest');

    Instead I have to use this line:
    add_action('wp_enqueue_scripts'', 'jquery_latest');

Viewing 1 replies (of 1 total)
  • The topic ‘media uploader isnt working’ is closed to new replies.