创建woocommerce主题时, 我收到以下错误消息。致命错误:未捕获错误:调用C:\ xampp \ htdocs \ premier \ wp-content \ themes \ woocommercetheme \ functions.php:7中未定义的函数get_tmplate_directory_url()堆栈跟踪:#0 C:\ xampp \ htdocs \ premier \ wp-includes \ class-wp-hook.php(288):load_stylesheets(”)#1 C:\ xampp \ htdocs \ premier \ wp-includes \ class-wp-hook.php(312):WP_Hook-> apply_filters (NULL, 数组)#2 C:\ xampp \ htdocs \ premier \ wp-includes \ plugin.php(478):WP_Hook-> do_action(Array)#3 C:\ xampp \ htdocs \ premier \ wp-includes \ script -loader.php(2667):do_action(‘wp_enqueue_scri …’)#4 C:\ xampp \ htdocs \ premier \ wp-includes \ class-wp-hook.php(288):wp_enqueue_scripts(”)#5 C:\ xampp \ htdocs \ premier \ wp-includes \ class-wp-hook.php(312):WP_Hook-> apply_filters(NULL, Array)#6 C:\ xampp \ htdocs \ premier \ wp-includes \ plugin php(478):WP_Hook-> do_action(Array)#7 C:\ xampp \ htdocs \ premier \ wp-includes \ general-template.php(2879):do_action(‘wp_head’)#8 C:\ xampp \ htdocs \ premier \ wp-content \ themes \ woocommercetheme \ header.php(7):wp_head()#9 C:\ xampp \ htdocs \ pre mier \ wp-includes \ template.php(722):第7行的C:\ xampp \ htdocs \ premier \ wp-content \ themes \ woocommercetheme \ functions.php中的r你的网站上存在严重错误。
#1
只是拼写错误的问题!正确的代码是:
get_template_directory_uri()
评论前必须登录!
注册