Support » Fixing WordPress » Header disappears when using “pretty” permalinks

  • Resolved Melanie Richards


    The site I’m working on is:

    All the sections of the site (“pages” in WP language) work when I use the default URL structure, but of course that will frustrate the average user.

    When I use /%postname%/ as the custom, I get a 404 error.
    When I use /%year%/%postname%/ as the custom, it yields the same URLs (since I am using pages) as /%postname%/, but this time the header.php completely disappears when I call it into a page (it still shows up when called into index.php).

    I have moved the codex from a subdirectory to the main directory, but followed directions and didn’t change the mySQL database at all. Could moving the codex have affected this?

    Please let me know how to fix this, because I would love to have “pretty” permalinks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff


    It looks like you did some customization on the theme. It’s hard to tell where without seeing your files, but I’ll try my best to explain.

    I’m seeing this in your source code where the header is:

    <img src="header.jpg">

    Basically, that’s telling the browser to get the image from the-URL-that-I-am-at/header.jpg .

    So, if you’re on , the browser is pulling the image from which works perfectly. But, if you go to , it’s pulling the image from which doesn’t exist.

    To fix this, find where you made the above addition (probably in your theme’s header.php file) and change it to:

    <img src="" />

    First of all, nice site!

    Changing the default structure would affect the way it works. Unless you specify the directory in the General settings under “WordPress address (URL)” it won’t know where to find the header.

    I assume this is what you mean?

    Wow. Thank you macmanx, that’s one of the most basic fixes ever. I can’t believe I overlooked the direct vs. relative img linking..thanks for solving such a dumb error.

    Thanks for your responses, both of you. It was the URL of the img that was incorrect.

    Moderator James Huff


    You’re welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Header disappears when using “pretty” permalinks’ is closed to new replies.