I'm working on a Multisite where each site has its own header image. I have a staging and production setup where everything is edited on staging. A new site gets created and it has its own header image, all good.
But when I go to move to production, doing a staging database file export, changing the domain names for production, and then importing that database file to the production server those header images are missing.
In the WP-Admin it sees the Previously uploaded
image and the src is empty. I get img src="" on inspection of the element.
Anyone else have this experience or something similar? In my functions.php
I've added custom-header theme support.
// Add custom header support
add_theme_support( 'custom-header' );
This might be where I'm going wrong but I also have this in the custom-header.php
function my_network_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'my_network_custom_header_args', array(
'default-image' => 'http://mynetwork.com/wp-content/uploads/my-logo-default.png',
'default-text-color' => '000000',
'width' => 736,
'height' => 220,
'flex-height' => true,
'wp-head-callback' => 'my_network_header_style',
)));
}
add_action( 'after_setup_theme', 'my_network_custom_header_setup' );
I recently added a default image so at least the page doesn't look broken and that works.
Any suggestions for how debug this issue? Maybe it's my callback that's missing something.
sed
in the Terminal, but that's a a basic search and replace. Thanks @TomJNowell that might give me a place to start!