The page you often see when clicking on any link saying “404 Error” or “Page not Found” or “Page cannot be displayed” etc etc. is basically a 404 Error Page. Its like a dead-end for your user. Which can lead to exit of Website Surfing and obviously no one wants to see his visitors leave like that. So here are some tips to get the best out of the 404 Page.
Giving useful links and information on a 404 page can help your user stay and go more around your Website or Blog. You can check out mine here.
Showing a Search box, some recent Post or list of archives is a good way to let user stay on the Blog more.
Create a 404.php page in your theme folder if you don’t have already. You can use any styles and HTML tags you want, to fit your needs. But try using the same design structure that of Blog, so the page looks like its also part of the Blog.
Make sure you have these basic PHP Codes in your 404 file. The easy way is to follow The Custom Page Template Tutorial to create a 404 page and insert content as u like it.
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Some useful tags you may want to use:
Here are some of the tags that you can use:
Display Archive by Months:
<?php wp_get_archives(‘type=monthly’); ?>
This code will display archive by months, but it will list all months. So it might become a mess if you have a blog that is three years old.
Display list of Categories
<?php wp_list_cats(); ?>
This code will list all categories on your blog. Ofcoures you can style them however using list tags or others. To exclude any category such as “Uncategorized” follow this tutorial
Display Most used Tags
<?php wp_tag_cloud(‘smallest=8&largest=12&unit=pt&number=30&format=list&order=RAND’); ?>
This will show the most used tags in a cloud form.
Display Recent Posts
<?php get_archives(‘postbypost’, ’17′, ‘custom’, ‘<li>’, ‘</li>’); ?>
This brings the most recent Posts written on your Blog.
There are too many tags you can use but here are some most important or should say finest ones !