Im trying to get a custom header to my wordpress theme.
$args = array(
'width' => 1920,
'height' => 800,
'default-image' => get_template_directory_uri() . '/images/header.jpg',
'uploads' => true,
); add_theme_support( 'custom-header', $args );
Added that to my functions.php and want the default-image to be the image that show if its no image set in admin.
But it wont show anything. the "img src" is empty.
Tried to upload a image then it shows, what could be the problem?
<img src="<?php echo header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
Using that in my front-page.php (the width and height is set correctly).