- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我希望从我的子 genesis 主题中的重复 css 中清除我的代码。一些插件使用相同的库但版本不同,例如 font-awesome。
如果你在这里看到 html 代码 www.cartomanziadivinazione.it 你可以看到:
<link rel='stylesheet' id='fontawesome-css' href='//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css?ver=1.3.9' type='text/css' media='all' />
我想删除这一行,我在函数主题中写了这个
add_action('wp_enqueue_scripts', 'cleaning_seo');
function cleaning_seo() {
wp_dequeue_style( 'fontawesome-css' );
wp_deregister_style( 'fontawesome-css' );
}
但是没有...
最佳答案
根据 codex :
Remove an enqueued script.
To be dequeued, the script must have been enqueued. Attempting to dequeue a script before the script is enqueued will have no effect.
因此,有可能您正试图在脚本排队之前将其从队列中取出。
确保您在正确的地方使用此功能;尝试增加执行顺序:
add_action('wp_enqueue_scripts', 'cleaning_seo', 999);
关于css - Genesis 框架中的 wp_dequeue_style 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38294437/
我正在构建一个 wordpress 主题,并在我的 style.css 中为插件创建了一个自定义类:Social Count plus 问题是插件使用了一个名为 counter.css 的自己的 cs
我正在构建一个 wordpress 主题,并在我的 style.css 中为插件创建了一个自定义类:Social Count plus 问题是插件使用了一个名为 counter.css 的自己的 cs
这是我网站的当前 HTML 输出。 我想使用下面的代码在 functions.php 中注销此样式 gforms_datepicker_css,但它不起作用。 add_action( 'wp
我希望从我的子 genesis 主题中的重复 css 中清除我的代码。一些插件使用相同的库但版本不同,例如 font-awesome。 如果你在这里看到 html 代码 www.cartomanzia
我是一名优秀的程序员,十分优秀!