WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Replacing the default header (oh yes, I've searched) (72 posts)

  1. ClintH
    Member
    Posted 7 years ago #

    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

  2. webDressing
    Member
    Posted 7 years ago #

    I'm assuming you're trying to change the default theme/folder. If that's the case then place your new header image here:

    themes > default > images

    If you name your new image kubrickheader.jpg and upload it, then it should ask you if you want to overwrite the old image, choose yes. If it doesn't ask you to overwrite it, then check the name and extension. If you want to call the image something else (like header.gif) then you'll need to change the name in the css file also. Make sure you clear your cache in your computer too, or it might not 'see' the new image. Hope that helps :)

  3. ClintH
    Member
    Posted 7 years ago #

    Well, just for grins, I did go ahead and just rename my header graphic "kubrickheader.jpg" and uploaded it to the folder you mentioned, which is where I'd put it originally. I changed the CSS header URL back to what I think it was originally ('images/kubrickheader.jpg'), cleared the cache, and did get something new.

    This.

    So now I've got my header graphic, repeating at least twice--you can see an eighth of an inch of it or so underneath the black on the left side--with the default theme black box sitting on top of it.

    This is maddening. It's amazing that such thorough documentation could still be so unhelpful.

    Thanks for your help so far. Your further assistance will be greatly appreciated.

    Clint

  4. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    i checked.
    just replace this line in header.php

    <!--#header { background: url('http://www.aliastex.com/wp-content/themes/default/images/header-img.php?upper=000000&lower=000000') no-repeat bottom center; }

    with

    <!--#header { background: url('http://www.aliastex.com/wp-content/themes/default/images/kubrickheader.jpg') no-repeat bottom center; }

  5. Vonsomething
    Member
    Posted 7 years ago #

    Maddening. Agreed. I'm having a similar problem. I just switched to the default template from one which was a little closer to the end result I wanted, because it was suggested that maybe the theme I was using was complicating my attempts at customization.

    But I'm having similar problems. My header image briefly showed up, but then was gone. I too have a little experience with css, and if I struggle briefly, still get the result I want. I don't know if it's the PHP, or just the wordpress method of having code in so many separate files, but it's really frustrating to spend the few hours a week I have to spend on my blog scrolling repeatedly through the same page(s) of code, making changes that don't have the expected impact. Again I agree with Clint, there is a lot of documentation on line, but it's self-referencing, and there are almost too many directions for each subject.

    That (rant, sorry) said, I have a similar problem with the same template, but mine doesn't have the code ghanshyamgadh references in my header.php file(?) There seems to be a lot of code devoted to the gradient in the header in various files, but I have no idea what it's safe to delete. I'm considering switching templates again, but my whole intent was to implement my own design by modifying a template -and switching templates is beginning to seem pointless - the default has a lot of code I don't need, and seems to complicate editing, and the other templates may well have non-standard code that other users can't help me with. Not sure what direction to take...

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    My advice: Write your own template. It's not that hard. A lot of the documentation is based around what they considered to be the most commonplace stuff, but since then, a lot of templates have gone another direction.

  7. ClintH
    Member
    Posted 7 years ago #

    ghanshyamgadhiya,

    Thanks for the help. The problem is that the line you suggest I replace doesn't exist in my header.php file.

    These are the contents of my header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <style type="text/css" media="screen">
    
    <?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 } ?>
    
    </style>
    
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">
    
    <div id="header">
    	<div id="headerimg">
    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    		<div class="description"><?php bloginfo('description'); ?></div>
    	</div>
    </div>
    <hr />
  8. csbrown
    Member
    Posted 7 years ago #

    I just went in to look at the different themes and it changed my header. How do I get my original one back.

    Sorry I am really new at all this too.

    Csbrown

  9. ClintH
    Member
    Posted 7 years ago #

    I have to say, I'm just about to dump WordPress. It may be free, but what I'd really like is an app that works, straight out of the box. I've tried to follow the documentation, but it's inaccurate--that is, it tells me, for example, to change things that aren't there--and so far the support is wanting. I've had some kind people offer assistance, but there needs to be someone who actually *knows how to fix stuff.* So far I'm very unimpressed. All I want is the frickin' header graphic to work.

  10. vkaryl
    Member
    Posted 7 years ago #

    Everyone here is a volunteer. That's it. We try to offer help as and when we can.

    Trying to tweak the "default" wp theme is an exercise in frustration. The best thing to do is go to http://themes.wordpress.net/, check off your requirements for a theme in the selection sidebar, then search on them and find a theme that meets most of your look/layout requirements.

    Tweaking most any theme from there for graphics etc. will be an infinity easier than doing same with the "default". I've been using wp for 2.5 years, I develop, design, and manage websites on a daily basis, I write clean valid code, and I won't touch kubrick with the longest pole in the universe.

  11. ClintH
    Member
    Posted 7 years ago #

    vkaryl,

    Thanks for the prompt response. Sorry if I sounded a bit snippy in that last post, but I've been trying to fix this off and on for two months now and my frustration level is at its peak. I want to be able to tell people I've got my blog up and running and I can't with it like this.

    I'll take your advice and go the custom theme route. Thanks for that tip. I have to wonder, though, why it is that if the default theme is as inscrutable as you imply it is, why there isn't an effort to make it easier and more accessible. The documentation, at the very least, needs work.

    I'll let you know how it goes. Thanks again.

    Clint H.

  12. vkaryl
    Member
    Posted 7 years ago #

    I dunno Clint. I've been wondering about the "default theme" situation for over 2 years myself. And honestly, I don't have a clue.

    Thing is, a lot of the themes on various theme sites started from the default, but the authors have done all the hard work for you.

    Best of luck, if you have other questions, please post back and give us another chance, 'kay?

    [And if you've got a theme you like, but there are some nitty-picky-dirty-gritty things you just can't sort, email me at vkaryl *at* bytehaven *dot* com - replacing the obvious - and I'll do my best to help you off-list and no charge.... as long as it's NOT kubrick! *laughing*]

  13. Vonsomething
    Member
    Posted 7 years ago #

    One of the reasons I settled on WP after much internal debate is the fact that their is the support community that exists. As Clint said, it's a free product, and while I can complain about the organization of the documentation, the fact that there is so much documentation, and so many people in these forums offering assistance (whether it results in a full-fledged resolution or not) affected my decision. I looked at every similar product available, and visited these very forums before settling on WP.

    I am having better luck with my 3rd template, but vkaryl - unfortunately there is no option for "clean valid code" when searching templates. That would be nice though. I guess it takes more research, but I have to say that WP installed easily, and has 'managed the content' of the site pretty much flawlessly from the start. That's the part I wouldn't want to face without WP.

    I'll just have to exercise patience. Thanks to everyone who is using their time and expertise to help the WP uninitiated.

  14. vkaryl
    Member
    Posted 7 years ago #

    Heh.... yeah, "clean valid code" is a whole other animal. Now, if you get to the point where everything is "mostly" valid but you've got some really obscure errors, I'd be happy to help you chase them down - see email in post above - and yes, that would be free.

  15. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    ok,

    I get this line in view source

    <!--#header { background: url('http://www.aliastex.com/wp-content/themes/default/images/header-img.php?upper=000000&lower=000000') no-repeat bottom center; }

    but it is wrong it should be

    <!--#header { background: url('http://www.aliastex.com/wp-content/themes/default/images/kubrickheader.jpg') no-repeat bottom center; }

    like this.

    I think you have to check your functions.php( line no 281),
    header-img.php files.

    otherwise replace them with original files.
    I just guess it.
    it may help you. :-)

  16. webDressing
    Member
    Posted 7 years ago #

    It may be free, but what I'd really like is an app that works, straight out of the box.
    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.

    for example, to change things that aren't there
    Again, what isn't there? WordPress documentation applies only to WORDPRESS files. Custom themes are written in PHP and HTML, and the authors of those custom themes are free to apply it as they deam necessary for that particular theme/plugin. WordPress has no control over them, just like WordPress has no control over how the end user uses their product. The bigger problem here is that you probably don't understand how to code, but that's really not WordPress's problem. WordPress didn't write the PHP scripting language, they are just using it for their product.

    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. Same thing applies to those who write those great little plugins. As a coder you try to help those who don't understand PHP, but you simply can't design/write/test plugins and be on the forums 24/7. 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. In regards to having a perfect XHTML template, I really wouldn't waste much time worrying about that. First of all I.E. (even IE7) doesn't even support XHTML. 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. Worry about making your search engines happy. They will effect your sites success far more than valid code. Of course you always want to 'strive' for having as clean of code as possible, but just don't lose any sleep over it :)

  17. ClintH
    Member
    Posted 7 years ago #

    "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.

  18. ClintH
    Member
    Posted 7 years ago #

    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.

  19. ClintH
    Member
    Posted 7 years ago #

    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.

  20. Doodlebee
    Member
    Posted 7 years ago #

    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.

  21. webDressing
    Member
    Posted 7 years ago #

    "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.

  22. ClintH
    Member
    Posted 7 years ago #

    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'

  23. webDressing
    Member
    Posted 7 years ago #

    "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?

  24. vkaryl
    Member
    Posted 7 years ago #

    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....

  25. Doodlebee
    Member
    Posted 7 years ago #

    '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 // } ?>
  26. ClintH
    Member
    Posted 7 years ago #

    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.

  27. vkaryl
    Member
    Posted 7 years ago #

    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....

  28. Doodlebee
    Member
    Posted 7 years ago #

    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).

  29. ClintH
    Member
    Posted 7 years ago #

    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.

  30. webDressing
    Member
    Posted 7 years ago #

    "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?

Topic Closed

This topic has been closed to new replies.

About this Topic