我在wordpress中自己创作一个主题。但是突然间我的functions.php文件停止工作了。我正在排队一个样式表文件。第一次成功了。但现在不行了。这有什么问题吗?(我是wordpress的新手)我的代码是
<?php
function get_external_files(){
wp_enqueue_style('style', 'get_stylesheet_uri()');
}
add_action('wp_enqueue_scripts', 'get_external_files'); 发布于 2015-06-11 04:39:22
您已经将get_stylesheet_uri()放入引号中,''将其转换为字符串而不是函数调用.这应该是可行的:
<?php
function get_external_files(){
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'get_external_files'); https://stackoverflow.com/questions/30771634
复制相似问题