Use flexible headers
-
I need help !
I want that the theme “twentyseventeen-child”-picture shall automatically
adopt to the green of the user. For that I rote to the function.php (in a child theme)/* Use flexible Headers – Info from
https://codex.wordpress.org/Custom_Headers and
https://codex.wordpress.org/Function_Reference/register_default-headers and
https://developer.wordpress.org/reference/functions/register_default-headers/
*/register_default_headers( array(
$args = array(
‘flex-width’ => true,
‘width’ => 980,
‘flex-height’ => true,
‘height’ => 200,
‘default-image’ => get_template_directory_uri() . ‘%2$s/images/header.jpg’,
)));
add_theme_support( ‘custom-header’, $args );and in the header.php (in the child-theme)
” height=”<?php echo get_custom_header()->height; ?>” width=”<?php echo get_custom_header()->width; ?>” alt=”” />
The result: I get two pictures. One is fix size the other is fixed together with the menu. It would be very kind if anyone has an idea what’s wrong.
Thanks a lot
Willi
The topic ‘Use flexible headers’ is closed to new replies.
