[Support request] Remove Jquery

Home Forums Support [Support request] Remove Jquery

Home Forums Support Remove Jquery

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #389347
    Farhan

    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' );
        }
    }
    #389490
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The next version of GP doesn’t use jQuery. You can download the beta on our GitHub page: https://github.com/tomusborne/generatepress

    #389492
    Farhan

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

    Thank yoU!

    #389495
    Tom
    Lead Developer
    Lead Developer

    Likely a couple weeks. Yes, you’ll still receive Dashboard updates if you install the beta ๐Ÿ™‚

    #389497
    Farhan

    Awesome going too install in that case!

    #389517
    Tom
    Lead Developer
    Lead Developer

    Awesome, let me know if you run into any problems ๐Ÿ™‚

    #448839
    John

    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?

    #448850
    Farhan

    @John

    The 2 version of the theme has already removed jquery. Pretty awesome! checkout the details at https://generatepress.com/generatepress-2-0/

    #448865
    John

    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?

    #448944
    Tom
    Lead Developer
    Lead Developer

    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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.