How can I remove jquery from the frontside of my WordPress?

前端 未结 10 903
逝去的感伤
逝去的感伤 2020-12-29 02:33

My wordpress site is a bit heavy to download. On the frontend, its including jquery unnecessarily. In my firebug it looks like:

jquery.js?ver=1.3.2
         


        
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 02:51

    Wordpress adds this jQuery call via a template tag named , which appears in most themes, and is necessary for some plugins to work.

    It could be annoying, not only because of loading, but because it might kill previously loaded jQuery, and might even get in the way of some plugins who try to load jQuery as well.

    The quick fix is openning up the file header.php in your theme's directory, and adding:

    
    

    right before

    
    

    Or just combine them both into:

    
    

    A more technical explanation could be found here

提交回复
热议问题