包含自定义样式表时wordpress中出现PHP错误
错误 我在functions.php中的代码如下包含自定义样式表时wordpress中出现PHP错误,php,wordpress,wordpress-theming,Php,Wordpress,Wordpress Theming,错误 我在functions.php中的代码如下 ( ! ) Parse error: syntax error, unexpected '}' in C:\wamp64\www\wordpress\wp-content\themes\awesometheme\functions.php on line 5 Call Stack # Time Memory Function Location 1 0.0007 228960 {main}( ) ...\index.p
( ! ) Parse error: syntax error, unexpected '}' in C:\wamp64\www\wordpress\wp-content\themes\awesometheme\functions.php on line 5
Call Stack
# Time Memory Function Location
1 0.0007 228960 {main}( ) ...\index.php:0
2 0.0013 232064 require( 'C:\wamp64\www\wordpress\wp-blog-header.php' ) ...\index.php:17
3 0.0021 252584 require_once( 'C:\wamp64\www\wordpress\wp-load.php' ) ...\wp-blog-header.php:13
4 0.0044 263544 require_once( 'C:\wamp64\www\wordpress\wp-config.php' ) ...\wp-load.php:37
5 0.0062 420184 require_once( 'C:\wamp64\www\wordpress\wp-settings.php' ) ...\wp-config.php:89
您的添加操作中的awesom脚本队列
中有一个打字错误。它应该是awesome\u script\u enqueue
您还缺少一个结束代码>在wp\u enqueue\u样式的末尾。
非常感谢。
<?php
function awesome_script_enqueue(){
wp_enqueue_style('customstyle',get_template_directory_uri() . '/CSS/awesome.css','array()','1.0.0','all')
}
add_action('wp_enqueue_scripts','awesom_script_enqueue');