Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Create a Cool Error 404 Page in WordPress
  1. Home
  2. Elementor Tutorials
  3. How to Create a Cool Error 404 Page in WordPress

How to Create a Cool Error 404 Page in WordPress

404 error page

Visitors receive the “Error 404” page when they try to access content that doesn’t exist on your site. This can be caused by a myriad of things including mistyping the address. Although this page does serve a purpose, it doesn’t give visitors incentive to explore your site to look for the content they want. This is why many website owners create a customized error 404 page.

WordPress has a few different ways to allow owners to create a unique error page. Since most visitors may simply abandon a website that shows the default error text, it’s ideal to take advantage of these modifications. Although some kinds of alterations to the 404 page may require a bit of coding, there are other methods that can make the process easier for novice developers.

Error 404 From the Theme

error 404 from theme

Some themes will have the 404 page built into its development. These error pages will usually have the theme’s graphic design and color scheme to make the site more fluid. In the widgets area, some templates may even include the sidebar for the error page allowing you to add content or use shortcodes. For example, you could place the top 10 most read posts on your site within the error 404 sidebar to give visitors options should they see this page.

Error 404 From a Plugin

error 404 from plugin

One of the easiest ways to modify the 404 page is through the use of plugins. The features included are up to the developer, but several have the ability to record the number of times a 404 error occurred. Many will also allow you to customize page and URL redirects directly from the 404 error. Instead of someone seeing a blank screen with the message, he or she can be redirected to a page of your choice from the admin panel in WordPress. Plugins such as “Custom 404 Pro” will even record the keywords used when arriving to this page.

Plugins are often one of the most utilized when it comes to making changes for error pages such as these. It takes a great deal of the work out of programming while simplifying the experience for the administrator. You can find these plugins by following these instructions:

  1. Click on the “Plugins” option in your WordPress admin panel.
  2. Click on the “Add New” button at the top of the following page.
  3. Type “error 404” in the search box on the right side of the Add Plugins page.
  4. Once you hit enter, an extensive list of plugins will appear.

The hardest part about using many of these plugins is choosing the one that best fits your site. Some of them will even allow you to build redirects for other errors as well.

Customizing Error 404 from the WordPress File

error 404 from wordpress flies

The more direct approach to customizing the error page is to alter the 404.php file in your WordPress installation. However, this takes a bit of coding knowledge. If it’s not done correctly, you may inadvertently cause the page to stop functioning properly.

There are a couple of ways you can alter the 404.php file. You can add your own codes to add more to the appearance or you could use coding from plugins to display specific information. For example, you can display the most popular posts on your site by using the “WordPress Popular Posts” plugin and inserting the following code into the 404.php file:

<?php wpp_get_mostpopular(); ?>

Where is the 404.php?

404 php

When making these alterations, you’ll need to access the 404.php file. Most WordPress installations will have this file readily available in the editor. Here is how you may access that file:

1  Click on the “Appearance” control in your WordPress Dashboard.

2  Click on the “Editor” subsection under the Appearance.

3  On the right hand side, you may see a list of files you can access. “404 Templates” should be on the top of the list. Click on this file.

4  Make any coding changes you wish in the editor, and then click the “Update File” button on the bottom.

Not all installations of WordPress will be this easy to access coded files. You may have to search for the 404.php within the theme’s folder of which you’re using on your host.

You don’t have to settle for a plain error 404 page for your WordPress website. In fact, it can play a role in retaining visitors that you could have lost otherwise. Give your error pages more functionality and pizzazz by customizing them. Your target audience may appreciate the effort.

What kinds of information do you think would be valuable in a 404 page? Do you monitor how often visitors reach an error page on your site?

Was this article helpful?

Related Articles

Comments

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.