我有两个插件
1)肥廊
2)沙龙预订
所以FAT库有一个特定的js (select2),它与沙龙预订设置页面发生冲突。
在这个URL中
example.com/wp-admin/post-new.php?post_type=sln_booking我试图DISABLE胖画廊,因为它会导致js错误,我不能做我的工作。
知道如何只在特定的页面上阻止它吗?
非常感谢!
发布于 2021-11-29 06:22:28
发布于 2017-04-22 12:03:38
试试这样的东西。这并不会使整个插件停用,而只是删除导致问题的脚本。没有经过测试,如果您不知道如何使用它们和使用什么参数,请查找这些函数。
// add this hook if in admin area
if (is_admin()) add_action("wp_enqueue_scripts", "my_dequeue_script", 99);
function my_jquery_enqueue() {
// don´t do it if it´s not the page you want to remove the script
if (get_current_screen() != "yourpage") return;
// deregister the script
// find the exact name of the script in the plugin where it is registered
wp_deregister_script('fatgalleryScript');
}https://wordpress.stackexchange.com/questions/264498
复制相似问题