WordPress – Improve your 404 File Not Found answers (1 of 4)
A lot of times, maybe through wrong link or pages that can not be accessed any more, your viewers arrive to your WordPress web site and get the famous 404 File Not Found page error. WordPress improves old methods and depending on the theme you are using lets the viewer to remain in your web site with a blank page with the 404 message.
In order to improve your viewers experience, the blank page is no enough, they will be pleased if you let them to go a step further…
| Applies to:
WordPress 2.8 |
These customizations are provided “AS IS” without warranty of any kind and DiceLock Security disclaims all warranties, EITHER EXPRESS OR IMPLIED INCLUDING THOSE OF MERCHANTABILITY, NONINFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY, OR FITNESS FOR A PARTICULAR PURPOSE.
Upgrading or reinstalling the customized source code (package, plugin, component, …) may remove the customizations performed. |
Your viewers when they get an 404 File Not Found error they get the following page:
Page content within the web site:
Maybe your viewers can browse your web site because your theme allows it. This point is a great one, but you can improve their experience if you provide them at that point with a tool to search what they are looking for.
WordPress provides the Search tool to allow the viewers to get where they want. A lot of times this tools appears on the top, bottom or in one of the sidebars and the viewer must look for it.
You can put in your 404 File not Found page, maybe in your 404.php or in index.php (located under atahualpa folder) in Atahualpa theme as in the exemple the Search box. The 404 File Not Found page would be in Atahualpa theme:
<?php // END of: If there are any posts // If there are no posts: else : ?> <h2><?php _e('Not Found','atahualpa'); ?></h2> <table width="100%"> <tr> <td colspan="2"> <br /><p><?php _e("Sorry, but you are looking for something that it's not found. ","atahualpa"); ?></p><br /> </td> </tr> <tr> <td colspan="2"> <br /><br /><b>Site search</b><br /><br /> Or you can use our search form to find the proper information you are looking for ...<br /><br /> </td> </tr> <tr> <td width="50%"> <?php get_search_form(); ?><br /><br /> </td> <td> </td> </tr> </table> <?php endif; ?> <?php get_footer(); ?>
Where the inserted code is:
<tr> <td colspan="2"> <br /><br /><b>Site search</b><br /><br /> Or you can use our search form to find the proper information you are looking for ...<br /><br /> </td> </tr> <tr> <td width="50%"> <?php get_search_form(); ?><br /><br /> </td> <td> </td> </tr>
With this modification your viewers will get the following screenshot when they get a 404 File Not Found error:
In this way, your viewers will get in front of their eyes the tool that will make them to stay in your site making them comfortable.



































