Site logo

Archived topic

Remove Jquery

9 replies · Started by Farhan on September 21, 2017

Viewing posts 1–10 of 10

For a project I want to remove jquery from frontend and usually the following code would do that but since some of the generatepress modules use it it still loads.

is there any way to remove it even if it breaks stuff for now without editing any core files?


add_filter( 'wp_default_scripts', 'change_default_jquery' );

function change_default_jquery( &$scripts){
    if(!is_admin()){
        $scripts->remove( 'jquery');
        $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
    }
}

Awsome, When's the estimated official release and does the auto update work from beta?

Thank yoU!

Likely a couple weeks. Yes, you'll still receive Dashboard updates if you install the beta :)

Awesome going too install in that case!

Awesome, let me know if you run into any problems :)

Hi Tom,

I am also looking to disabling jquery on my website. Has this feature already been implemented in the newest release version or is it still in beta?

Thanks.

Looks like it is updated on the theme but I use the GP Premium plugin and whenever I have it activated, it is loading jquery. Is there any workaround for that?

Certain elements in GP Premium still require jQuery. We'll be slowly converting them to vanilla javascript as time/technology allows.

For example, the slideout navigation will be using vanilla js soon.

Things like the sticky menu or masonry will still require jQuery going forward.

This archived topic is closed to new replies.