I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file.

The plugin is testimonial-slider

How to edit the plugin to prevent it from loading jQuery?

I tried other methods like enqueue scrips, but cannot find success.Now I'm planning to edit this plugin, can anyone guide me?


1 Answer 1


If a plugin is written well (or the theme) than you have no reason to worry about duplicate jquery loading.

if your theme uses header.php to load jquery then your doing it wrong and should use enqueue scripts to load jQuery...

Wordpress uses wp enqueue script to declare scripts once and not multiple times.

Example of loading scripts the right way:

function sg_theme_js(){

    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'bootstrap', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array('jquery'), 3.3, true);
    wp_enqueue_script( 'miscscripts', get_template_directory_uri().'/js/misc-scripts.js', array('jquery'), 1.0, true);

add_action( 'wp_enqueue_scripts', 'sg_theme_js' );

i have downloaded the plugin and found where scripts are being loaded (in testimonial_1.php) and the plugin doesnt load jquery - i guess the author assumes your theme includes jquery correctly (as it should)

i would search for the spot you include jquery in your theme and change the way to do that to the right way AKA using the wp_enqueue_script function


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.