在功能中设置具有自定义大小的主题徽标。php:
function theme_prefix_setup() {
add_theme_support( \'custom-logo\', array(
\'height\' => 100,
\'width\' => 400,
\'flex-width\' => true,
)
);
}
add_action( \'after_setup_theme\', \'theme_prefix_setup\' );
输出自定义徽标:
function theme_prefix_the_custom_logo() {
if ( function_exists( \'the_custom_logo\' ) ) {
the_custom_logo();
}
}