繁体   English   中英

WordPress:自定义程序未显示,没有错误

[英]Wordpress: Customizer not showing, no error

这是我的functions.php无法正常工作的部分(我没有收到PHP错误,也没有任何显示):

function calmar_studio_customizer_register ($wp_customize) {
        $wp_customize -> add_section('calmar_studio_colors', array (
                'title'         => __('Colors', 'calmar_studio'),
                'description'   => 'Modify the theme colors',
        ));
        $wp_customize -> add_setting('background_color', array (
                'default'       => '#fff',
        ));
        $wp_customize -> add_control( new WP_Customize_Color_Control($wp_customize, 'background_color', array(
                'label'         => __('Edit Background Color', 'calmar_studio'),
                'section'       => 'calmar_studio_colors',
                'settings'      => 'background_color',
        ) ));
}
add_action('cutomize_register', 'calmar_studio_customize_register');

虽然无法完全解决问题,但我从https://gist.github.com/Abban/2968549抓取了示例,并将其复制到我的functions.php文件中。 完美运作。 现在,我必须进行调整,并使项目显示在页面上。

这可能是插件冲突问题。 请停用插件并尝试。

谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM