Support » Themes and Templates » Picture over the header?

  • I want to place a picture over the header-picture.
    I placed the picture in my image folder in the theme-map (wordpress\wp-content\themes\mytheme\images).
    I write following code: <img src=”/images/thepicture.jpg” width=”758″ height=”98″ style=”float: left” />
    in header.php in the beginning of the <body>.
    It seems to be the right place to write it but the picture still won’t show up. I think my link may be wrong, but I can’t figure out where else to put it.
    anyone got a suggestion?

    thanks very much…

Viewing 15 replies - 1 through 15 (of 15 total)
  • Your path to the image img src="/images/thepicture.jpg" suggests that your image resides in the images directory directly under the document root. The starting ‘/’ points to the root directory.

    You can use the full path /wordpress/wp-content/themes/mytheme/images/thepicture.jpgif you like.

    I would rather create a directory wordpress/images and sav the image there, which would make the path

    It is shorter and the path to the image is the same even if you decide to change your theme.

    cheers thanks alot 🙂

    Hm. I am not that bad in html but I can’t get this to work. I am writing regular code and have put the image in the right folder. Still it won’t show up.

    Is this something special and particular I have to do because it is wordpress?


    can we have a link to the site so maybe we can see what’s going on?

    Im afraid not, Im running it locally at my computer at the moment 🙁

    But this is the image adress now:
    <img src=”wordpress/wp-content/themes/GG/images/a.jpg” width=”960″ height=”98″ style=”float: left” />

    For the other pictures, for example the header is the adress:
    #header { background: url(“<?php bloginfo(‘stylesheet_directory’); ?>/images/personalheader.jpg”) no-repeat bottom center; }

    And that works fine.. Can’t figure out how to solve this one 🙁

    try using the absolute complete URL of the image file… see if that works?

    no it did not work. this is so weird. maybe wordpress can’t handle “own pictures”..?
    maybe I have to do something special?

    No, wordpress handles ’em just fine. It is just html.

    But without being able to look at the source and style sheet it sure is difficult to help fix!

    Maybe put the header.php from your theme and stylesheet up at a pastebin and give us links so we can see the source?

    The pastebin is here

    You can post the link you get here.


    There they are. I put the code in txt-files but you have to pic show->source for the header. 🙂

    thanks again for your help..!

    it didn’t say much, did it?

    Nothing jumped out at me, alas.

    Did you try following ladydelaluna’s advice? Viz:

    “try using the absolute complete URL of the image file… see if that works?”

    That would mean including the full URL for the image, starting with “”.

    It,s a little bit hard to imagine from your style.txt and header.txt, how it all is meant to work.
    I see some strange behavior though.
    In your header.php ( as it were ) you have this markup:
    <img src="wordpress/wp-content/themes/GG/images/a.jpg" width="960" height="98" style="float: left" />

    I guess you mean that this is the full (relative ) path to your image. It is not. The full relative path has to start at the document root of your web site, i.e. at “/”.
    The markup should look like this:
    <img src="/wordpress/wp-content/themes/GG/images/a.jpg" width="960" height="98" style="float: left" />

    The image is linked in outside the “page”, “header” and “headerimg” containers ( <div> )
    This means it has a good chance of being displaced with respect to the rest of the page. The “page” <div> is the wrapper that contains everyting else on the page.
    I suppose in your header.txt you have deleted the original header image markup.
    When you say you want to place the image “over the header -picture”, do you mean it should be vertically above the the header image or on top ( hiding part of the header image ).

    Ive tried the complete url. Ive tried:
    <img src=”/wordpress/wp-content/themes/GG/images/a.jpg” width=”960″ height=”98″ style=”float: left” />

    I want the image placed above the header image(not on top hiding part of the header image). I have not deleted the original header image markup.

    The image is linked outside the <div>s because that was the only way I could figure out how to get the picture over the headerimage.

    I also did a test: I uploaded an image in a post and looked at that ones link. It was:

    Then I put the a.jpg in the same folder and linked it exactly the same way (in 2 ways):


    Still it did not work. Im really confused..

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Picture over the header?’ is closed to new replies.