我正在创建一个基于twentyfourteen 并希望更改自定义标题图像尺寸。自定义标题页说明:
图像宽度应至少为1260像素。建议宽度为1260像素。建议高度为240像素。
这似乎来自中设置的默认值/inc/custom-header.php
:
function twentyfourteen_custom_header_setup() {
add_theme_support( \'custom-header\', apply_filters( \'twentyfourteen_custom_header_args\', array(
\'default-text-color\' => \'fff\',
\'width\' => 1260,
\'height\' => 240,
\'flex-height\' => true,
\'wp-head-callback\' => \'twentyfourteen_header_style\',
\'admin-head-callback\' => \'twentyfourteen_admin_header_style\',
\'admin-preview-callback\' => \'twentyfourteen_admin_header_image\',
) ) );
}
add_action( \'after_setup_theme\', \'twentyfourteen_custom_header_setup\' );
此文件包含在twentyfourteen/functions.php
:require get_template_directory() . \'/inc/custom-header.php\';
因为这条线使用get_template_directory()
而不是get_stylesheet_directory()
, 我不能用我自己的版本覆盖它custom-header.php
.有没有办法更改我的子主题中所请求的维度?