I'm using the _s starter theme and setting up a custom header image. I've got this code:
add_theme_support( 'custom-header', apply_filters( 'xyztheme_custom_header_args', array(
'default-image' => get_template_directory_uri() . "/headerimg.jpg",
'default-text-color' => '000000',
'width' => 1000,
'height' => 250,
'flex-height' => true,
'wp-head-callback' => 'xyztheme_header_style',
) ) );
I'm using the header_image function to echo out the default header image (located in the root of the theme dir) into the header area. Upon selecting the default image in the customizer it does show up on the page and it did output the first couple of reloads when I was on the front end but after that it stopped displaying.
When I go into the customizer and select it again it shows up in the customizer view on the page but when I hit save and go back to the front end it doesn't show up anymore, going back to the customizer the header default image has been deselected somehow.
It does work if I choose to upload the image and use it from the media library.
Anyone else getting this bug?
xyztheme_custom_header_args
to the question in case the problem is there. – majick Mar 19 '16 at 2:07get_header_image
uses theme_mods to store the data, you might want toget_theme_mod('header_image');
and/or check themod_{$themename);
value via/wp-admin/options.php
to see if it is saving... and when it is disappearing. – majick Mar 20 '16 at 6:56