在 functions.php Word Press 中添加主题支持后自定义徽标按钮不会出现

Custom logo button doesn't appear after adding theme support in functions.php Word Press

我正在按照教程为 Word Press 创建自定义主题。我正在尝试添加自定义徽标主题支持,但按钮没有出现在 Word Press 面板中。

function fja_theme_support()
{
    add_theme_support('custom-logo');
}
add_action('after_theme_setup', 'fja_theme_support);

here is my word press admin panel

这是主题开发人员手册中的示例

挂钩应命名为 after_setup_theme,提供一系列附加设置 - 您可以找到它们 here

function themename_custom_logo_setup() {
    $defaults = array(
        'height'               => 100,
        'width'                => 400,
        'flex-height'          => true,
        'flex-width'           => true,
        'header-text'          => array( 'site-title', 'site-description' ),
        'unlink-homepage-logo' => true, 
    );
 
    add_theme_support( 'custom-logo', $defaults );
}
 
add_action( 'after_setup_theme', 'themename_custom_logo_setup' );