The importance of a custom ERROR 404 page in WordPress
July 16, 2006
Quite a few times I have attempted to access this blog only to find all posts and comments gone!
The first time it happened I almost got a heart attack. I panicked thinking that my blog had been hacked. Each time I clicked on a category or a link leading to a post I got the dreadful message: “Sorry, no posts matched your criteria.”
I implored myself to calm down and to investigate the issue. The first thing I did was to access the blog in FireFox and Opera, and what a relief I felt when all posts suddenly and ‘magically’ re-appeared in FireFox. I refreshed the page(s) a couple times just to make sure I wasn’t seeing ‘Ghosts’ or something similar.
In a nutshell here is what caused the disappearance of posts and comments in Internet Explorer: My IE Browser cache was full and/or corrupted. The browser cache is meant to speed up browsing but in this instance it was the culprit, preventing the viewing of my posts. A problem that disappeared as soon as I cleared the cache.
When a very busy or less technically savvy visitor encounters the same problem, they will most likely go elsewhere possibly denying you the patronage of a ‘Targeted Visitor’, hence the need for a custom 404 - Page.
The default 404 Error page in wordpress is short, cryptic and scary: “Not Found - Sorry, no posts matched your criteria”. Therefore I set out to create a simple custom error page containing more helpful messages for my visitors.
Here is what I came up with: Custom Error 404 Page. It’s simple straight forward and loaded with useful information to make that valuable visitor stay a little longer, browsing my blog and even more important, get the opportunity to search the rest of my site. Note: Also remember to add the custom code to the file: “page.php” - which usually displays the error message: “Sorry, but we are unable to find any article matching your request.”
To display a particular page, WordPress will look for several template files in your active Theme. The first one it finds will be used to display any given Page. Below is the order of files WordPress will look for:
1. The Page’s selected “Page Template”
2. page.php
3. index.php
If it doesn’t find content or the page you requested, wordpress will display the error message in page.php and not 404.php — so make sure page.php contains a useful error message too.
In this business (Internet Marketing) every single visitor counts!
References:
1. Creating an Error 404 Page
2. Clearing your browser cache
Comments
Got something to say?
You must be logged in to post a comment.



