Blog

Let’s make that charmless “Whoops! Page Not Found.” more useful

Tested on WordPress 3.6.1  &  ClassiPress Version: 3.3.1

Whoops! Page Not Found

It happens that people do small mistakes on your site that ends up in a ordinary “Whoops! Page Not Found.” message. But that standard “404-Error” page looks extremely odd and boring! Let’s give it some affability and present your visitors a more useful message than just “NOT FOUND”

You like the idea? OK, here we go:

We only need to copy and edit the existing 404.php file:

As usual, we don’t want to modify the original files from ClassiPress. So the first thing we do is upload a copy of the original /themes/classipress/404.php file to your /themes/your-child-theme/ folder. Now we start to edit our copy. You can do it local our use your build in WordPress editor in your admin area => Appearance.

Open that 404.php file and find this part of code, starting around line 22:

Replace the above code with this:

Finally we only need to upload an image with the name notfound.png to our /themes/your-child-theme/ folder. If you like this smiley from our sample, just comment below so i can send it to you.

So what does the above code do?

  • We changed the title message
  • We call an image from your /your-child-theme/images/ folder with the name notfound.png
  • A click on this image brings the visitor back to the home page
  • We explain what may have happened
  • We offer a mailto link that sends an email to the site admin (it calls the email address that you have set in WordPress => Settings => General)
  • We say thank you 😉

The result will be something like this:

404-new

Click on the above image for a live demo!

Enjoy your new 404.page and rate this tutorial if it was useful for you.

Thanks!

Let’s make that charmless “Whoops! Page Not Found.” more useful 5.00/5 (100.00%) 17 votes

Tags: , , ,

3 Responses to “Let’s make that charmless “Whoops! Page Not Found.” more useful”

  1. steely July 31, 2013 at 04:39 #

    Samcy as you stated if needed a copy of image to let you know. Can you please send to me. Thanks

  2. Lars August 20, 2013 at 18:23 #

    Sweet:) I got another picture but the tutorial is just that – sweet!

  3. Petry Studio September 6, 2013 at 08:35 #

    Hey, cool 404! I would like the image please!

Leave a Reply


4 + 6 =

Go Up ▲Go Up ▲