Support » Fixing WordPress » 404 Page doesn’t resolve, just shows code from my sidenav

Viewing 15 replies - 1 through 15 (of 22 total)
  • I get the same problem and it is driving me mad.

    I am using 2.6.2 on PHP 5.

    I have permalinks as the postname.

    The code that shows on mine starts at a point in the header and continues to the end of the page.

    Can anybody help?


    what Plug-Ins have you installed?

    i’ve got 1 Click Upgrade, All In One SEO, Records, Social Bookmarking links.

    I’m using the Modern theme from Performancing.

    You using any of these? Do you host your own site? If you post or PM me a URL i could have a look and see if we have anything similar that might explain the issue. At the moment, I’m stumped and Google isn’t liking the fact I haven’t got a 404 page.

    Hey guys, I’m having just the same frustration. I’ll tried deactivating all plugins without any success.

    I have quite a few plugins installed but none of those that you list.



    Volunteer Moderator

    @ewengcameron: code appearance on your 404 page due to missing codes in your 404.php. Open the 404.php of your theme in notepad or bbedit. Check to see that the following code is there:

    <?php get_header(); ?>
    <div id="content">
    <div id="contentleft">
    <h1>Not Found, Error 404</h1>
    <p>The page you are looking for no longer exists.</p>
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>
    <!-- The main column ends  -->
    <?php get_footer(); ?>

    Cheers for the code!

    My current code is

    <?php get_header(); ?>
    <div id="content">
    <div id="contentleft">
    	<h1>Not Found, Error 404</h1>
    	The page you are looking for no longer exists.
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>
    <!-- The main column ends  -->
    <?php get_footer(); ?>

    I just updated the file to the code you quoted (can’t see any difference) and its still broken :(.

    I’ve just FTP’d into the server and checked the file, its got the correct code in. Its sitting in:


    I know a bit about htaccess and I’m a PHP coder by profession so I should be able to fix this but I don’t wanna start tinkering with it if its a common problem, or anything that’s been solved before.

    Any ideas?


    The only plug in I have out of those is 1 click upgrade but surely that can’t cause this?

    My 404.php file has all the needed code. And it calls it but the code displayed is only part of what should be in the header. It starts part of the way through a nav bar that i have across the top of the page.

    I can’t really show you the page as it is for a company that I work for and it isn’t for outside eyes, sorry.

    Not sure where to go from here.

    If it helps the page starts with ‘Content-Length: 15668’ and then just starts showing code from a point in the header. Not sure if that tells anybody anything?

    I might do a manual update to check if that was an issue.

    I’ll let you know how it turns out!

    Im having same problem. When view source of parsed page no text from 404.

    I checked search.php as it seeems it might be searching.

    Also checked htaccess.

    This is what ive found so far:

    Check your Front Page Display (under Settings, Reading). It looks like you’re not using Posts, only Pages – I had the same problem on a blog and the way I “resolved” it was by making up a fake Post and setting that as the Posts page. I have no idea why that worked or what causes the problem though.

    When I tried this trick, I noticed that my “Posts” drop down listed Pages not posts. Eh?

    From webmaster world:

    if (is_single() && !have_posts())
    header("HTTP/1.0 404 not Found");

    Did not work for me either.

    I think it has to do with the index.php file in the theme Im using. Dont want to spend to much time unless its something else.

    Anyone else?

    I’ve not had the time to reinstalll WP yet.

    I have tried changing themes and that doesn’t help so I don’t think its a problem with the theme.

    I’m pretty stumped on this one.

    Nemonet, are you using 1-click upgrade?

    Hi guys,

    I too am having the same problem. As you can see here (using tinyURL so google doesn’t index this post relative to my site)

    I’m running 2.6 with the following plugins active:

    Page Lists Plus
    Register Plus
    Themed Login and Register

    I can say with 95% confidence that the problem existed before the last two were installed.

    Here is the code from my 404 page:

    <?php get_header(); ?> 
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id="content">
    <div id="content_posts_wrapper">
    <div class="post">
    <div class="page_content_post">	
    <h2>404 Page</h2>
    <div class="actual_post">
    <div class="clear"></div>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php get_sidebar(); ?> 
    <?php get_footer(); ?>

    Any ideas?


    It looks like the code for the 404 page itself is actually good, if I point the url to: it works

    The problem seems to be that the location of the 404 page is impropperly specified (I’m guessing maybe due to permalink re-write rules) could this be the problem everyone else is having as well?

    Does anyone know where I can change the 404 URL specification??

    I think this might be to do with rewrite rules.

    I did have the postname rewrite but have switched it off and now URL/?tag=TAGNAME works fine.

    Don’t know why his bug occurs but I guess you just have to switch off rewrite or not have tags.

    Out of interest who are you hosted with? Mine is with It might be interesting to compare phpinfo files? I’ll get mine tonight and post it here.

    My site is hosted with too and i have got the rewrite using data & postname.

    Looks like KalJer has fixed the issue, (check the link he/she posted). Hopefully they’ll let us know the issue.

    Having exactly the same problem with a whole selection of WP sites (various versions) all of them hosted on Fasthosts in the UK.

    Have been talking to Fasthosts support and they’ve identified some sort of clash (although they haven’t been much more specific than that with the line:

    RewriteRule . /index.php [L]

    in the .htaccess files, which is something essential to do with permalinks (?)

    The problem doesn’t occur on another WP site I have hosted with DataFlame, but clearly have issues as well, so I’m guessing it’s to do with some server setup that these two hosts have in common?

    Still talking to Fasthosts support about the issue. If I find a definite solution, I’ll post one here.

    I think streamline are actually a fasthosts reseller, not 100% sure though. Happening here too.

    Any ideas?

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘404 Page doesn’t resolve, just shows code from my sidenav’ is closed to new replies.