WordPress移除wp-block-library-css代码引用-WordPress主题

摘要:wordpress升级到5.0版本后,前端查看源代码会发现多了一个css样式文件的引用,这段代码是新版本Gutenber…

wordpress升级到5.0版本后,前端查看源代码会发现多了一个css样式文件的引用,这段代码是新版本Gutenberg编辑器的css文件,但对于依然使用经典编辑器或者只使用Gutenberg编辑器基础编辑功能的wordpress站点,这个文件没有必要引用。

把下面代码放到当前主题的functions.php文件:

添加好确认保存后,即可移除该css文件的调用。

来源:http://www.wazhuti.com/3659.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_12741.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?