Replacing the default header (oh yes, I’ve searched)
-
I see that people have been asking this question for months for different versions of WordPress, but lots of them are unresolved, and the ones that are either the solutions don’t work for me or don’t apply.
Here’s the thing: My first step was to go to “Designing Headers” in the Codex, where I am told:
***********************************************
To change only the header image reference, open the header.php template file and look for the styles like this: #header { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/wc_header.jpg") no-repeat bottom center; } #headerimg { margin: 7px 9px 0; height: 192px; width: 740px; } To change the image file, replace the "kubrickheader.jpg" with the name of the new graphic image you have uploaded to your site to replace it. If it is in a different directory, change that by replacing the bloginfo() tag with the specific address of the graphic's location.
***********************************************
The problems here are manifold.
First, I’m assuming by “header.php template file” they mean simply the “header.php” file, but this is somewhat confusing since there are in fact files listed in the theme editor that include “template.” Since such a file doesn’t show up in my list, I assumed the header.php file was the one meant.
Which leads me to the second and most important problem, which is that the CSS ID tags given in the above text don’t exist in the default theme “header.php” file.
So I checked in the “style.css” file. There are #header and #headerimg tags in the CSS there, so I changed the URL and size specs accordingly, then cleared my cache, and…nothing. I’ve double- and triple-checked that my image is in the images folder of the default theme. It is there.
So my obvious question is how do I replace the standard header in WP with mine? The instructions don’t match what my files contain, and my intuition–I actually know a little about CSS and HTML–is getting me nowhere.
Thanks,
Clint Hayes
- The topic ‘Replacing the default header (oh yes, I’ve searched)’ is closed to new replies.