我一直在开发一个网站在WordPress的,当我正在获取函数...的dbppwl_script()它响应wbut当我试图运行后主题函数,它显示了一个语法错误相关的函数后主题
<?php
// theme function code
function dbpplwp_theme_setup(){
add_theme_support('custom-logo');
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
add_image_size('home-featured', 680, 400, array('center','center'));
add_theme_size('single-img', 600, 550, array('center','center'));
add_thehe_support('automatic-feed-links');
register_nav_menus( array(
'primary' => _('Primary Menu','dbpplwp')
));
}
add_action('after_setup_theme', 'dbpplwp_theme_setup' )
function dbpplwp_scripts(){
wp_enqueue_style('style',get_stylesheet_uri() );
};
add_action('wp_enqueue_scripts','dbpplwp_scripts');
?>
有谁知道这里会出现哪种错误吗
2条答案
按热度按时间vdzxcuhz1#
您错过了
;
在PHP中每个语句必须以分号结尾。此处缺失:
add_action('after_setup_theme', 'dbpplwp_theme_setup' )
到
rdrgkggo2#
第10行有一处打字错误,应为add_theme_support(),而不是add_thehe_support。此外,在add_image_size(“主页特征”,680,400,数组(“中心”,“中心”))和add_theme_size(“单图像”,600,550,数组(“中心”,“中心”))中,应为add_image_size(),而不是add_theme_size()。