• Resolved raethe

    (@raethe)


    Yes, another one of these topics, I’m afraid.

    I’m tweaking away at the WordPress Classic theme, and I’d like to use my own header image. I was able to add the header image successfully by adding it as a background to the #header element of my CSS style, but said header image happens to have its own text, so of course the blog title is appearing over top of it. It looks, to say the least, somewhat silly.

    I can hide the header text in style.css by adding display:none to the #header element, but that hides the image as well as the text. Likewise, I can get rid of the text by deleting the <?php bloginfo('name'); ?> in the header.php file, but again, this deletes the entire image (or darn close. It leaves a few pixels in the top right corner.)

    Any suggestions would be welcome. Thanks all. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • What you will want to do is insert your image in the header.php – so that rather than just a background, its an image that can be a link. That way if people click on it, it will link back to the main page. Mine looks like this:

    <div id=”header”>

    <img src=”your header image address” border=”0″>

    </div>

    (the border’0″ will remove any pesky link borders from appearing around the image)

    THEN goto your CSS and set the size to fit the exact size of the image – like this:

    #header{
    float: left;
    width: 800px;
    height:200px;
    background-image:
    url(your header image address);
    }

    Subsitute the 800 and 200 for the images actual dimensions.

    At the end of the CSS enter:

    #header h1 { display:none }

    This will hide the blogs name, but still make it pop up on search engines.

    Let me know if this helps!

    Thread Starter raethe

    (@raethe)

    Seems to have done the trick – thanks for your help!

    (It probably didn’t help that I didn’t notice until I went to change the #header that the div id in the actual php file actually had an id of “rap” for some reason. I feel like such a ditz right now…)

    Thread Starter raethe

    (@raethe)

    Just a note for anyone else looking at this thread – I actually removed the img tag from the header.php file and left the div empty. I did this because the image wasn’t displaying properly in Internet Explorer; it was giving me a broken image file overtop of the header image I was using.

    That fixed the problem, but it also means that the header image doesn’t link back to the home page. This isn’t a problem for me, as I’m using my own navigation menu, but I thought other people using this solution might want to know. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide ONLY text (not image) in Blog Title’ is closed to new replies.