Header background disappeared
-
Let’s see the webpage with the issue.
http://www.olelarsonsfolks.net/Blog. Sorry, I included a link but it didn’t show up.
Your header image no longer exists: http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/header-img.php?upper=000099&lower=4180b6
Did you move WordPress* recently?
I have never moved sites, nor changed themes, since I started the blog 5 years ago. Last updated WP to 3.6 several weeks ago. The issue began between 8 AM and 11 AM PDT today. I did not edit any theme files, or change anything else, in the interim. Not up to speed on php. There is a file http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/header-img.php (without the “?upper …”) but I can’t make heads nor tails of the code in it.
Can you deactivate all plugins to see if the issue persists?
Deactivated all plugins (several of which show updates available). Also cleared browser history and cache to be sure page loaded freshly. Issue persists. BTW, thanks for your keen attention.
I’m still stumped on this. Viewing source in my browser, it looks like the line that calls for the header-img.php file is commented out:
<style type=’text/css’>
<!–#header { background: url(‘http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/header-img.php?upper=000099&lower=4180b6’) no-repeat bottom center; }
–></style>I’m over my head here; don’t understand how the http code is generated nor how to edit/change it.
The site again: http://olelarsonsfolks.net/Blog/
I meant html code – I guess the php code generates it?
Here is the code again with backticks
<style type='text/css'> <!--#header { background: url('http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/header-img.php?upper=000099&lower=4180b6') no-repeat bottom center; } --></style>The #header line seems to be commented out. Could that be causing my lack of header background? There is a “…/images/header-img.php” file, and also image files called by the php code therein.
Were you using the standard Kubrick header?
http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/kubrickheader.jpgI think so, but not sure. Here is the “…images/header-img.php” file, it names the jpg you refer to (which does exist) but I can’t tell if it actually uses it:
<?php /** * @package WordPress * @subpackage Default_Theme */ /** @ignore */ $img = 'kubrickheader.jpg'; // If we don't have image processing support, redirect. if ( ! function_exists('imagecreatefromjpeg') ) die(header("Location: kubrickheader.jpg")); // Assign and validate the color values $default = false; $vars = array('upper'=>array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2')); foreach ( $vars as $var => $subvars ) { if ( isset($_GET[$var]) ) { foreach ( $subvars as $index => $subvar ) { $length = strlen($_GET[$var]) / 3; $v = substr($_GET[$var], $index * $length, $length); if ( $length == 1 ) $v = '' . $v . $v; $$subvar = hexdec( $v ); if ( $$subvar < 0 || $$subvar > 255 ) $default = true; } } else { $default = true; } }I think so, but not sure.
I don’t care about the source code. Did it look like this?
http://olelarsonsfolks.net/Blog/wp-content/themes/default/images/kubrickheader.jpg
Ok. This is what I think happened. Your host (I think) is http://www.webhostingpad.com/ who just switched from PHP 5.3 to 5.4 on the 21st of this month.
The background you are missing is a gradient background and it will not work with PHP 5.4. Choices – open the graphic in a program like PhotoShop and make the background solid or maybe your host can run your site in PHP 5.3.
Keep in mind your theme been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress, PHP, etc.
It looked like that or similar. I was able to restore it to exactly that appearance (gradient) by selecting in the admin area: Appearance->Custom Header->Advanced->Select Default Colors. Now it looks fine. I am thinking about changing themes, per your suggestion. Thanks a lot and will close this thread.
The topic ‘Header background disappeared’ is closed to new replies.