• Resolved clinth

    (@clinth)


    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

Viewing 15 replies - 16 through 30 (of 71 total)
  • Thread Starter clinth

    (@clinth)

    “What didn’t work ‘out of the box’? Chances are you’re talking about a custom theme that you’re trying to install, and you can’t blame WordPress for that. Blame the author who made the custom theme.”

    No, I’m talking about the WordPress default theme. I thought I made that clear in my first post, but perhaps not. And I should clarify that, since it’s not exactly accurate. Once I got it set up on my website, it did in fact appear to be “all there.” I didn’t do any posting with it as my intention was to customize the header before posting, so I can’t speak to how well that side of it worked. I’ll find that out after I get over the current hump.

    “‘for example, to change things that aren’t there’
    Again, what isn’t there? WordPress documentation applies only to WORDPRESS files.”

    Which is all I was trying to fix. Read my first post. That’s my problem. I got WP loaded, it appeared to work, so the first thing I did was dig through the documentation to figure out how to load my custom header. The instructions given didn’t work. In fact, they referred to code that didn’t exist in the default WP files I was accessing through the theme editor.

    “‘there needs to be someone who actually *knows how to fix stuff.*’
    People can’t be at two different places at the same time. If the coders who write WordPress code were baby sitting the forums – then they would never have any time to write the next version of WordPress.”

    I don’t consider taking care of current customers and their issues “baby-sitting.” On the contrary, I consider that the first order of business. Any company or organization that has future versions of its product as its focus rather than ensuring that its current product is working properly has got it exactly backwards. That being said, I don’t know if WP is actually guilty of that; I’m only addressing the argument you’ve offered. But it does make more sense to me to have someone who actually works on the WP code provide assistance with that code, rather than volunteer members who simply have experience with it. To the extent those volunteers can provide solutions, outstanding, and for most problems that’s surely enough. But after a certain point, especially on an issue like this where as best as I can tell, there are unresolved problems going back months, there does in fact need to be a “Certified WP Technician,” if you will, who is trained on the code itself, available to provide assistance. If that means taking some people off the main coding team to handle tech issues, so be it. That’s just part of doing business. Customers are far more concerned about what they’re actually using than what’s coming down the pike. If they’re not happy now, they’re likely not planning on upgrading to a future version anyway.

    “The only logical answer is that the members learn how to code, even on a basic level, themselves. Just think of it as an investment in your site. Its really not that hard to learn coding.”

    I know how to code, at least on a basic to intermediate level. I’ve developed a few sites of my own, with HTML, CSS, and Javascript. I don’t know PHP. Like to know it, and down the road maybe I will, but all I wanted to do now was switch out a header graphic. Didn’t seem like that ought to be a difficult thing to do, especially since the documentation I read before deciding to use WordPress made it look like a simple thing to do. But the documentation was inaccurate, the information in the forums either irrelevant or ultimately unhelpful, and so here I am two months later, still trying to replace a header graphic.

    As for valid code, that was someone else’s point, not mine. To the extent that valid code is necessary for the site to run properly, I expect the programmers to write valid code. Beyond that, I’ll worry about it on my own sites.

    In the meantime, I’ll try the latest suggestion I see up above on how to solve the apparently quantum mechanical trick of replacing one header graphic with another. Thanks again to everyone offering suggestions. My frustration isn’t with y’all; it’s with code that doesn’t look the way I’m told it should.

    Thread Starter clinth

    (@clinth)

    vkaryl,

    Thanks for the e-mail address. I am browsing other themes per your suggestion. I’ve found a few that look promising. If no one can point me to a solution by the end of the day, then I’ll go ahead and take that dive and see how that goes. It just seems ridiculous that I should have to go to the trouble of loading a custom theme simply to replace a header graphic.

    Cheers,

    C.

    Thread Starter clinth

    (@clinth)

    And once again, for those who want to take a crack at it, this is what the header’s doing at the moment.

    As a reminder, I did go ahead and simply rename my custom graphic “kubrickheader.jpg,” so that I wouldn’t have to change any code.

    First of all I.E. (even IE7) doesn’t even support XHTML.

    IE doesn’t support *XML* – it does support XHTML (XHTML and XML are not the same thing). Otherwise, you wouldn’t be able to see such sites in IE.

    Secondly even if you had a perfectly designed page it still wouldn’t matter that much because the very first time that someone left a < / b > tag open in a comment – then your site wouldn’t be XHTML compliant anymore.

    True – *that page* wouldn’t be. But it’d be an easy fix.

    In regards to having a perfect XHTML template, I really wouldn’t waste much time worrying about that.

    As a designer, and stickler for web standards, I do. If your site isn’t XHTML compliant, it throws IE into quirks mode, and you get all kinds of weird errors. Validation is most certainly important. If you want to use XHTML over HTML, then yes – no matter what you use – it needs to be “perfect” to avoid issues with your layout.

    I don’t consider taking care of current customers and their issues “baby-sitting.”

    No one who downloads and uses WordPress is a “customer”. This is open-source software. Free. No one pays for anything. Therefore, there is no paid support (if they don’t make money, how would they pay for a team to answer questions?) You get volunteers because the development of the software is ALL volunteer. They aslo *want* your issues so they can better WP in the next version. You download and use WP at your own risk. If you choose to use it, you need to learn *how* to use it. Usually it’s by trial and error, reading the docs, and asking here on the forum. It’s all free info, and it’s all based on volunteers who donate their time to help. To expect someone to be here all the time to answer questions means WP is not for you – you need to go get yourself some MT or another program you dish out money for, and you’ll get your support with correct answers 24/7.

    have someone who actually works on the WP code provide assistance with that code, rather than volunteer members who simply have experience with it.

    You get both here.

    there does in fact need to be a “Certified WP Technician,” if you will, who is trained on the code itself, available to provide assistance

    If you want to pay for assistance, you can go to the wp-pro list. There are plenty of people who will assist you for pay.

    That’s just part of doing business.

    This isn’t business, or Matt Mullenweg would be filthy rich right now.

    In the end, as my momma always said, “Don’t look a gift horse in the mouth.”

    And they were right, Kubrick is a headache to edit, and why they’ve chosen it as the default, no one seems to know. But to fix your problem as it stands:

    Open up header.php. Look for this section:

    <style type="text/css" media="screen">

    Just below it is a bunch of PHP code that ends in </style>

    Just comment all of that out. (meaning, put slashes before each line: //)

    Your stylesheet is already set up to show the kubrickheader.jpg file, and is pointing to the right directory for it. Try that first and see what happens.

    “I don’t consider taking care of current customers and their issues “baby-sitting.” On the contrary, I consider that the first order of business.”

    You’re using terms like ‘customers’ and ‘business’ but there are no customers as wordPress is free, and there is no business as wordPress makes no profit. When you pay for something you become a ‘customer’ – until then you’re just a ‘user’ of the program.

    “But it does make more sense to me to have someone who actually works on the WP code provide”

    There is no ‘wordPress code’ per se. It is standard PHP and anyone knowledgeable in PHP knows everything that the wordPress coders do. Having said that I have also noticed a lot of people having problems with wordPress images, particularly the headers. I still don’t quite understand why wordPress uses the wrapper as they do. I am more than happy with trying to help you find a solution to your problem. After all, the more I learn about why all of these people are having such issues, the more I can help others that have the same issues down the road πŸ™‚

    “XHTML and XML are not the same thing”

    Well technically that’s NOT true. XHTML 1.0 is a reformulation of HTML 4 as an XML 1.0 application, according to the XHTML 1.0 specification. In other words, it is an XML-based markup language that has the same set of element types and attributes as HTML 4. Read more about it here. IE does not support the application/xhtml+xml MIME type and it never has. You can make IE recognise this MIME type through a registry hack, but it will still treat it as HTML.

    Thread Starter clinth

    (@clinth)

    No one who downloads and uses WordPress is a “customer”. This is open-source software. Free. No one pays for anything. Therefore, there is no paid support (if they don’t make money, how would they pay for a team to answer questions?) You get volunteers because the development of the software is ALL volunteer.

    So change the word “customer” to “user.” I wrote all that mostly in terms of analogy. I understand WP is open-source and free. I expected to have to learn more about coding if I was going to get deep into customizing it. But I wasn’t planning on doing that. I was planning on switching out my header graphic. That was it. I assumed that, at least, would be a simple affair. My main frustration has been with the documentation, in that as abundant as it is, it’s been entirely unhelpful. Since what I’ve been trying to do has been about as basic as it gets, it sure seemed that the fix ought to be equally basic and quick.

    To expect someone to be here all the time to answer questions means WP is not for you – you need to go get yourself some MT or another program you dish out money for, and you’ll get your support with correct answers 24/7.

    I don’t expect someone to be here “all the time,” ready to pounce on every problem at a moment’s notice, as I understand it’s a volunteer effort. I’ve never thought otherwise. I did expect, however, simple things to be simple, and when they weren’t, for the documentation to fix them to be accurate, and when that wasn’t, for the support to provide a reasonably quick fix. None of that has happened. I’ve had several generous people take time to read (kind of) what my problems are, and offer suggestions on how to fix it, but so far none have worked. And that’s the main gist of my frustration with WP. It’s lovely to get something for free, but ultimately, if it doesn’t work the way I expect it to work, and as advertised, I haven’t gained anything. I’m now working on the third day (or fourth?) of trying to solve this problem (not counting the two months, off and on, that I’ve been jacking with it myself, trying to make the documentation relate to what I’m seeing in the actual files). After a while, as a time investment, yes, it might be better worth my time to head over to MT. We’ll see. I have a feeling once I get this taken care of, I’ll be okay, which is why I’m still hoping for a fix.

    have someone who actually works on the WP code provide assistance with that code, rather than volunteer members who simply have experience with it.

    you get both here.

    That’s good to know. And yet I still don’t have a working header.

    If you want to pay for assistance, you can go to the wp-pro list. There are plenty of people who will assist you for pay.

    That, actually, I didn’t know. I’ll look into it if this continues to be a dead-end.

    This isn’t business, or Matt Mullenweg would be filthy rich right now.

    In the end, as my momma always said, “Don’t look a gift horse in the mouth.”

    Fair enough, but at the end of the day, Matt wants people to have a good impression of his product and to use it. Presumably it’s of more benefit to him than not for that to be true. But if his documentation is lagging behind (which is true); if a lot of people are still stuck trying to make earlier versions work while newer versions are coming out (which is true); then it might behoove him to shore up the foundation before throwing down more bricks.

    Just comment all of that out. (meaning, put slashes before each line: //)

    Your stylesheet is already set up to show the kubrickheader.jpg file, and is pointing to the right directory for it. Try that first and see what happens.

    Thanks very much for the suggestion. I’ve tried that, both through the theme editor on the Dashboard and by hand and uploading it. Both times I received this error:

    ‘Parse error: parse error, unexpected ‘}’ in /home/content/t/e/x/texvanwinkle/html/aliastex/wp-content/themes/default/header.php on line 22′

    “I assumed that, at least, would be a simple affair.”

    You assumed correctly πŸ™‚ It shouldn’t be giving you this much grief. But don’t give up just yet, we’ll find the problem.

    I saw your Parse error before. First of all take a DEEP breath. All your frustration can take a lot out of you. Somewhere, somehow, you’re overlooking something, probably something very basic.

    First of all what version of wp are you using, 2.1.2?

    Also, what happens when you try to view your image directly by typing in its address (http://www.YourDomain.com/blog/wp-content/themes/theme_name/images/kubrickheader.jpg) do you see it?

    Clint, if you want to post the content of your header.php file to http://wordpress.pastebin.ca/ and post the resulting link back here, it might help us to see where the errant } is for one thing….

    ‘Parse error: parse error, unexpected ‘}’ in /home/content/t/e/x/texvanwinkle/html/aliastex/wp-content/themes/default/header.php on line 22′

    This is a simple solution, I think. It *would* help to see your actual code, but I’ll suggest another guess, based on what I can piece together here.

    Line 21-24 of “header.php”:
    Line 21:
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; }

    Line 22:

    <?php } else { // No sidebar ?>'
    
    Line 23:
    <code>#page { background: url(&quot;<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg&quot;) repeat-y top; border: none; }</code>
    
    Line 24:
    <code><?php } ?></code>

    So, you’ve got an extra closing bracket (that’s what “parse error, unexpected ‘}'” means) that you don’t need. You need to comment out one more bracket. My guess is that because “no sidebar” is already commented out, it may be contributing to the error.

    I would recommend making lines 17-24 look like this (everything between the <style></style> tags:

    <?php
    // Checks to see whether it needs a sidebar or not
    //if ( !$withcomments && !is_single() ) {
    ?>
    	<!--#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; }-->
    <?php // } else {  No sidebar ?>
    	<!-- #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }-->
    <?php // } ?>

    Thread Starter clinth

    (@clinth)

    Several good suggestions here. Thanks for all. I’ll start from the top.

    WebD:

    I’m now using 2.1.2. It was happening on the previous version as well, but when the “Danger, Will Robinson” message came out about it, I figured it wouldn’t hurt to move on up to 2.1.2 and see if that fixed anything. You can see how that worked out.

    When I try to view the image directly at the URL above, it gives me the same parsing error.

    Vkaryl:

    That’s a great resource. I’ve posted my header.php code to it. Here’s the link.

    doodle:

    I actually wondered about that “no sidebar” comment throwing it off myself, so I took it out. Still got the parsing error. You can see what it looked like at the pastebin. Now I’ll try your coding suggestion….

    Okay, some minor success. That at least fixed the parsing error, but my header’s still doing the weird thing it was doing.

    Thanks again for all your help, y’all. Let me know what else I need to do to help you figure it out.

    You know, there were some posts a year or so back, where spencerp had done the header tweaks needed to make kubrick behave like a normal theme and was providing a download link. Let me see if I can find those threads….

    AHA!
    You’re commenting out the style too. you’ve got:

    //<style>
    stuff in between
    //</style>

    “//” are PHP comments – <style> tags are HTML comments – they aren’t commented out the same way. So for starters, you’ve got that against you. Remove those // in front of the style tags. You only want the // between `<?php ?> tags.

    You also have the double slashes *outside* of the PHP tags – they need to be inside. If you see the code I posted above, you’ll see what I mean (I did it how it should be for you).

    Thread Starter clinth

    (@clinth)

    doodle:

    I copied and pasted your suggested code into my file and it did at least get it back to where it was showing the page, but the header’s still screwed up. So that part of my code reads exactly the way you sent it to me.

    “When I try to view the image directly at the URL above, it gives me the same parsing error.”

    How could you get a parsing error if you view the image directly? Can you post the path to your header image so we can check it?

    Clint you might also want to give THIS a try. I prefer fluid designs – with left or right sidebar as your choice. If you don’t want a sidebar it would be easy enough to remove.

Viewing 15 replies - 16 through 30 (of 71 total)
  • The topic ‘Replacing the default header (oh yes, I’ve searched)’ is closed to new replies.