admin管理员组文章数量:1405136
/vendors/font-awesome/font-awesome.min.css? ver=2.9.10
/yith-woocommerce-wishlist/assets/css/font-awesome.min.css? ver=4.7.0
/theme/css/font-awesome.min.css
**this csss are from different plugins and main theme.
and error is :
The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 2 request(s) and 60.5KiB.**
how can i combine them as one?
autoptimize wp plugin is not compatible with my website.
/
/vendors/font-awesome/font-awesome.min.css? ver=2.9.10
/yith-woocommerce-wishlist/assets/css/font-awesome.min.css? ver=4.7.0
/theme/css/font-awesome.min.css
**this csss are from different plugins and main theme.
and error is :
The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 2 request(s) and 60.5KiB.**
how can i combine them as one?
autoptimize wp plugin is not compatible with my website.
https://www.tarhdokan/
Share Improve this question edited Dec 19, 2019 at 22:17 RiddleMeThis 3,8078 gold badges22 silver badges30 bronze badges asked Dec 19, 2019 at 21:54 adam skadam sk 93 bronze badges1 Answer
Reset to default 2You can use wp_dequeue_style() to remove CSS a plugin is adding.
You can use it to dequeue the 2 stylesheets coming from your plugin and just keep the one in your theme.
However, they appear to be different versions of Font Awesome so you may run into some issues there, I'm not sure I don't use Font Awesome.
Here is an example of wp_dequeue_style()
which you can edit and add to your theme's functions.php.
function wpse_remove_styles() {
wp_dequeue_style('dokan-fontawesome');
}
add_action( 'wp_print_styles', 'wpse_remove_styles', 100 );
Note: You will need the handle for the stylesheet, which you can usually get by viewing the source, finding the stylesheet ID and removing -css. For example, in your case...
<link rel='stylesheet' id='dokan-fontawesome-css' href='.../vendors/font-awesome/font-awesome.min.css?ver=2.9.10' type='text/css' media='all' />
The handle should be dokan-fontawesome
.
本文标签: cssPlugin and themes are adding the same stylesheets
版权声明:本文标题:css - Plugin and themes are adding the same stylesheets 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744888980a2630657.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论