0
使用wp_dequeue_style我使用的是采用自举和jQuery UI的主题。在一个模板文件,一个要删除的jQuery:在模板文件
custom.php
/**
** Template Name: Custom
*
**/
get_header();
wp_deregister_style('jquery.ui.theme');
wp_dequeue_style('jquery.ui.theme');
?>
// my template goes here
<? php get_footer(); ?>
这行的也不能正常工作。
我试图putting the functions calls in a function,并呼吁他们与
add_action('wp_enqueue_scripts', 'wpdocs_theme_name_scripts');
这是模板如何包含了jQuery UI库:
wp_enqueue_style('jquery.ui.theme', get_template_directory_uri() . '/css/jquery-ui.min.css');
为'$ Template_Name',我应该使用的文件名或在评论中指定的模板名称? – giannisf
应该像'模板page.php'文件名,了解更多关于[什么is_page_template()进行比较?(http://wordpress.stackexchange.com/questions/238640/what-does-is-page -template - 比较 - 反对?answertab =#投票制表顶部) – Noman