WordPress - Enqueue scripts for only if LT IE 9

前端 未结 7 636
无人及你
无人及你 2021-01-31 09:13

In a WordPress theme, how do you conditionally include scripts for ie8 and below? This is primarily to apply polyfills for various html5/css3 features. I see that wp has the $is

7条回答
  •  花落未央
    2021-01-31 09:44

    As wordpress is a PHP script, it can access server variable via $_SERVER

    Then you can search for detect browser with PHP, PHP: If internet explorer 6, 7, 8 , or 9

提交回复
热议问题