• Resolved Brandon Wang

    (@brandonw)


    WordPress throws up my theme’s 404 page, but I don’t want it to. Deleting the 404 page only gives me the default WordPress 404.

    I have a sitewide 404 page I have constructed that looks great, but I don’t want to have duplicate code. Any way to get WordPress to stop taking over 404s?

Viewing 4 replies - 1 through 4 (of 4 total)
  • open your 404.php file from your active theme directory and customize it the way you want it.

    Thread Starter Brandon Wang

    (@brandonw)

    Well, I know that, but I have a site-wide 404 page defined by my own .htaccess, and it works everywhere except my /blog/ directory. Instead of duplicating code, I want WordPress to leave 404s alone and have ME handle them.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    No, you can’t do this. Why? Because if you’re using “pretty” permalinks, then all the URLs are actually referencing files and folders that are not physically there. WordPress has to intercept them in order to get the page and display it.

    Make your theme’s 404.php redirect or include your site-wide 404 instead.

    Thread Starter Brandon Wang

    (@brandonw)

    Ugh, I’m not dumb, I know what pretty permalinks are, but obviously there’s no way for WordPress to just ignore pages that aren’t there (but take over posts, etc).

    Thanks anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can WordPress leave my 404 alone?’ is closed to new replies.