• Resolved jbent

    (@jbent)


    I have a fresh install of WP 2.1 running on an Apache webserver at pair networks. I am not using mod_rewrite or custom URLs, just the default:
    https://www.example.com/?p=226

    I am using a custom theme that includes a 404.php file with my custom error page. If I manipulate the URL with a non-existant post, e.g.

    https://www.example.com/?p=22020

    WordPress uses the error section that is embedded in the single.php template, e.g.


    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    and it appears to be ignoring the 404.php template. Is there a way to get it to use the 404.php template for all errors?

Viewing 1 replies (of 1 total)
  • Thread Starter jbent

    (@jbent)

    Switching to custom URLs with mod_write seemed to be the answer. Now WP is using the 404.php template for all incorrect URLs.

Viewing 1 replies (of 1 total)
  • The topic ‘WP Ignores 404.php template’ is closed to new replies.