【发布时间】:2017-06-25 20:57:20
【问题描述】:
我正在尝试将自己的主题添加到 wp 主题中。但我收到下一个错误:
http://something.comget_template_drectory_uri/css/non.css?ver=1.0.0
网络::ERR_NAME_NOT_RESOLVED
我的文档路径有问题吗?
接下来是functions.php的路径: /home/something/something.com/wp-content/themes/something/functions.php
在我要入队的文件旁边: /home/something/something.com/wp-content/themes/something/css/nono.css
<?php
function nono_scrypt_enqueue (){
wp_enqueue_style('customstyle',get_template_drectory_uri.'/css/nono.css',array(),'1.0.0', 'all' );
wp_enqueue_script('customjs',get_template_drectory_uri.'/js/createO.js',array(),'1.0.0', 'all' );
}
add_action( 'wp_enqueue_scripts', 'nono_scrypt_enqueue' );
【问题讨论】: