SEOS THEMES

Free WordPress Themes

My default header image not saved

My WordPress default header image not saved. I go to Customize -> Header Image and the Image is hidden. This is my code.


$defaults = array(
'default-image' => '/img/myimg.png',
'width' => 1000,
'height' => 200,
'flex-height' => false,
'flex-width' => false,
'uploads' => true,
'random-default' => true,
);
add_theme_support( 'custom-header', $defaults );

One Comment so far:

  1. Your solution. Register the default image!


    register_default_headers( array(
    'yourimg' => array(
    'url' => get_template_directory_uri() . '/yourimg/header.png',
    'thumbnail_url' => get_template_directory_uri() . '/yourimg/header.png',
    'description' => _x( 'Yourimg', 'header image description', 'theme' )),
    ));

Leave a Reply

^