WordPress.org

Ready to get started?Download WordPress

Forums

Image in header won't display (11 posts)

  1. martingrina
    Member
    Posted 4 years ago #

    I'm using the theme Modularity Lite.
    I have modified the header so it displays an image instead of the default blogname and bloginfo.

    I've pasted some code into the header.php file and refreshed the file.
    On the front page the image displays correctly but when I start browsing on the site (for example entering a post) the image vanishes and leaves a "missing image icon" where the actual image should have appeared.

    Makes no sense. I've double-checked all the php-files in the theme editor
    and made sure that they fetches header.php.

    Can anybody help?

    Check it out: http://www.martingrina.com

  2. Ross
    Member
    Posted 4 years ago #

    What browser are you using?
    I am using Firefox 3.5.10 on Mac and the image shows up fine.

  3. Aaron
    Member
    Posted 4 years ago #

    Wow. Thought Id figure this out in under a minute. Got me stumped right now.

    If you are saying single.php calls header.php and the logo is in header.php then thats odd.

  4. Aaron
    Member
    Posted 4 years ago #

    What browser are you using?
    I am using Firefox 3.5.10 on Mac and the image shows up fine.

    Homepage it shows, but single pages it doesnt. Your showing it on single pages?

  5. Ross
    Member
    Posted 4 years ago #

    Oh. Now I see that it isn't showing on the single pages. Hmm...

  6. Aaron
    Member
    Posted 4 years ago #

    I dont know what it is but...

    Your homepage has no <title>

    From <body> down to the image all HTML matches

    The header is a different story.

    <link href="http://www.martingrina.com/blog/velkommen/" rel="canonical">

    On a inner page the canonical link is wrong. That is why the image isnt showing. But how you got it like that I dont know.

  7. Ross
    Member
    Posted 4 years ago #

    Well, I looked at the code and the logo is being called in the same way as the home page.
    Maybe, since the single pages are outside of the /blog directory (like http://www.martingrina.com/blog/foto/), the "wp-content/themes/modularity-lite/images/logo-top.png" tries to go to "http://www.martingrina.com/blog/foto/wp-content/themes/modularity-lite/images/logo-top.png".

  8. Ross
    Member
    Posted 4 years ago #

    Aah! Jackpot!
    When I was viewing the source, wp-content/themes/modularity-lite/images/logo-top.png showed up as a link. I clicked it, and it sent me to the source of "http://www.martingrina.com/blog/category/all/wp-content/themes/modularity-lite/images/logo-top.png" which does not exist.

  9. Aaron
    Member
    Posted 4 years ago #

    Aah! Jackpot!

    Read my last post. The answer is the canonical URL, so pretty much what you said.

  10. Ross
    Member
    Posted 4 years ago #

    Oh. Yep! Missed that. :-)

  11. martingrina
    Member
    Posted 4 years ago #

    Kinda embarrassing... Trying hard to figure this one out.

    Some points to consider:

    - The canonical URL only shows up here in http://www.martingrina.com/blog/velkommen/

    - I've placed the image inside an a tag and it is supposed to link back to the index page (http://www.martingrina.com/blog)

    How can I get this to work. What should I do instead of using a canonical URL? I've tried this one:
    <img src="../images/logo-top.png"> inside an a tag.

    And btw...
    The reasen I have no title is because the blogname() and bloginfo() fields in the wp-admin section is temporarly empty.

Topic Closed

This topic has been closed to new replies.

About this Topic