WordPress.org

Ready to get started?Download WordPress

Forums

Juiz Social Post Sharer
[resolved] plugin includes +1 copy of jquery in the footer (2 posts)

  1. synthview
    Member
    Posted 6 months ago #

    I’m struggling to stop Juiz Social Sharer to add a copy of jquery in the footer.

    I use this in functions.php

    function myJquery(){
    wp_deregister_script( 'jquery' );
    if(!is_admin()) {
    	wp_register_script('jquery', get_template_directory_uri().'/js/jquery.js', false, NULL, false);
    	}
    }
    add_action('wp_enqueue_scripts', 'myJquery');

    However, Juiz Social Sharer seems to force another instance of the script in the footer :( even if jquery is already registered.

    On other WP sites, without your plugin, my script works.

    Any idea?
    Thanks

    http://wordpress.org/plugins/juiz-social-post-sharer/

  2. synthview
    Member
    Posted 6 months ago #

    Sorry, got it to go

    If it interests anyone to be placed in functions.php

    function myJquery(){
    wp_deregister_script( 'jquery' );
    if(!is_admin()) {
    	wp_register_script('jquery', get_template_directory_uri().'/js/jquery.js', false, NULL, false);
    	}
    	wp_enqueue_script('jquery');
    }
    add_action('wp_enqueue_scripts', 'myJquery');

Reply

You must log in to post.

About this Plugin

About this Topic