I'm creating a child theme based on twentyfourteen and wish to change the custom header image dimensions. The custom header page states:
Images should be at least 1260 pixels wide. Suggested width is 1260 pixels. Suggested height is 240 pixels.
This appears to come from defaults set in /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' );
This file is included by twentyfourteen/functions.php
:
require get_template_directory() . '/inc/custom-header.php';
Because this line uses get_template_directory()
and not get_stylesheet_directory()
, I can't override it with my own version of custom-header.php
.
Is there a way I can change the requested dimensions in my child theme?