Simple WordPress 404 Page


404 pages are a great way to make your website that little bit more user-friendly. If you change the location or slug of one of your pages, then search engines and other websites may still send your visitors to an out of date location.

In the event that this happens, you don’t want your users to see something like this:

404

Users will most likely think that the website no longer exists. Instead, use WordPress to display a custom 404 page.

Below is a basic example of all you need, simply state that the page no longer exists and provide a link to the homepage. The 404 page will also match the rest of your website should you set up the template in the same way, so your users will know that they are on the correct website.

Feel free to paste the following on to your own website, remember to save the template file as 404.php and to include any relevant calls to your other template files (e.g. header.php, footer.php):

<h1>Error: Page Not Found</h1>
<p>Sorry but you have tried to reach a page that does not exist.</p>
<p><a href="<?php bloginfo('url'); ?>">Click here</a> to visit our homepage.</p>

The Result: a Friendly 404 Page

You will then see a much friendlier 404 page similar to the following:

Friendly 404

No comments yet

Reaction Form



Page optimized by WP Minify WordPress Plugin