Here will teach you how to create a character 404 page for your WordPress Blog. If you had already had the page, you can learn how to make it more friendy and character.
Most time people will ignore and not design the 404 page for it’s for a wrong 404. Actually 404 page also means that browser will leave or go on browsing your website. Of course they will leave if your 404 page is too boring, but they will go on to other pages if the page is rich and friendy enough.
What is a 404 error page
Most of the time, you create a website and several checks to ensure that each link is valid. However, over time, you’re likely to forget a link to a page has been deleted or changed the name of the page, or may change the name. Or search by search engine visitors to your website but can not link to this page, you will jump to the 404 error page. General wordpress theme contains 404.php, you do not need to design a single. But if not or if you want a personalized, creative 404 error page, you can design a single.
Error 404, 404 error page translated into Chinese, when a user directly through a search engine or open the link no longer exists when the page returned. 404 error page has a special meaning: a message to the viewer feedback, they requested page does not exist or the link error, while guiding users to browse the site rather than directly from other pages.
Based 404.php
General wordpress theme contains 404.php, other than individual. WordPress default setting for when to automatically find 404.php error page file, but if the file does not exist, the browser will display annoying error message. More is even possible to your blog’s SEO have adverse effects. If your blog topic is not the document. You can create a new blank file named 404.php
The following is the most basic 404.php code:
404.php File
<? Php get_header ();?>
<h2> Error 404 – Page Not Found. </ h2>
<? Php get_sidebar ();?>
<? Php get_footer ();?>
404.php basic code including H2 tags – “Error 404 – Page Not Found”, reads the header, sidebar, and footer of the instructions. Of course, you can implement the code as needed to adjust accordingly to suit their own blog template, style.
We will decompose through several steps to modify the 404.php tutorial. Please note that I have will use get_header, get_sidebar and get_footer command file called wordpress theme. You should be slightly modified as needed 404.php file to fit your theme.
Start editing 404 error page
First, we will add a search page 404 error code 404 error page that will not be too monotonous lack of action options. If there are 404 visitors visit your page, he can search through the search box to your other pages. This is to help you retain visitors a way.
Add a search code for the 404.php
<? Php get_header ();?>
<h2> Error 404 – Page Not Found. </ h2>
<p> Search: </ p>
<? Php include (TEMPLATEPATH. “/ Searchform.php”);?>
<? Php get_sidebar ();?>
<? Php get_footer ();?>
Creative 404 error page
Create a creative 404 error page to enable visitors to stay a short message on the error and then re-channel them into your home. 404 error page can be done and friendly as possible in order to achieve search engine optimization.
Now we will begin editing the header.php template file. In your header.php in the top of meta tags, you can add the following code:
<? Php
if (is_404 ()) (
$ RedirectHome = get_option (‘home’);?>
<? Php echo $ redirectHome;?>
Then add in the 404.php under the code:
404.php File
<? Php get_header ();?>
<h1> Error 404 – File Not Found. </ h1>
<h3> Please <a href = “<? php bloginfo (‘home’);?>” Click here </ a> to return to our home page, or you can wait to be redirected in 15 seconds. </ h3>
<? Php get_footer ();?>
The above example is used to guide visitors from the 404 error page turned to homepage. This will also help keep the user site, rather than make them feel confused and eventually leave. This example may not always be the best solution, but for visitors to find content on your website is very effective.
ensure that 404 error pages can work
You can enter one of your web page does not exist to test the 404 error page is valid. (Red is your home address)
For example: http://www.yourwebsitedomain.com/test404page.php
This will open your 404 error page, if not then explain the test fails.
If the test fails
If by chance your server does not automatically open the 404.php, you can modify. Htaccess support. Address found in the wordpress installation. Htaccess file and add the following code:
ErrorDocument 404 / index.php? Error = 404
If you have not installed wordpress ftp root directory, but installed in the ftp sub-folder, you must. Htaccess file modified to: (YOURSUBFOLDERNAME, that sub-folder name)
ErrorDocument 404 / YOURSUBFOLDERNAME / index.php? Error = 404
This will call your 404.php file.
The following is a complete code example, you use the 404.php church to help users find what originally looking for. Feedback as possible to give them some information in order to attract them to visit the other pages.
<? Php get_header ();?>
<h1> 404 Error </ h1>
<p> We cannot seem to find what you were looking for. </ p>
<p> Maybe we can still help you. </ p>
<ul>
<li> You can search our site using the form provided below. </ li>
<li> You can visit <a href = “<? php bloginfo ?>”</ a> </ li>
<A href = “<? Php (‘url’);?>” The homepage. </ A>
<li> Or you can view some of our recent posts. </ li>
</ Ul>
<p> Search: </ p>
TEMPLATEPATH. “/ Searchform.php”);?>
<h3> Recent Posts </ h3>
<ul>
<? Php
query_posts (‘posts_per_page = 5′);
if (have_posts ()): while (have_posts ()): the_post ();?>
<li> <a href = “<? php the_permalink ()?>” title = “Permalink for: <? php the_title (); ?>”><? php the_title ();?> </ a>
endwhile; endif;?>
</ Ul>
<? Php get_footer ();?>
You can page your personal style preferences and change the code to adjust. In the above example, we just told viewers it was a wrong link, and provide them with options for operation, such as search box. Can also increase the list of the latest articles to attract them to visit the website. These options are for tourists to visit the other pages, not allow tourists to see the 404 error page turned away.
To a more friendly 404 error page
To make a more friendly 404 error page, you pass the method described above, and add a creative image. You can also use the html code 404.php file in order to achieve the full page is an error page.
Here are some of the more interesting and creative 404 error page, hope to give you inspiration:
1. Mundofox.com

Mundofox.com error 404 page
2. CSSRemix.com

cssremix.com error 404 page pic
3.ChrisJennings.com

ChrisJennings.com error 404 page
4. ook.co.uk

ook.co.uk error 404 page
5. Youcastr.com

Youcastr.com error 404 page
6. JustCreativeDesign.com

JustCreativeDesign.com error 404 page
7. Agens.no

Agens.no error 404 page
To use it flexibility
Using the 404 error page on wordpress and static HTML pages are favorable. Both can use it to advertise, they can use it to better help visitors browse your website, blog. There are many ways you can create your own custom 404 error page, it can be said that there are many ways to help visitors to visit the website. Reference to other methods, according to personal web pages modified to suit your 404.php page. Note that before the backup of data changes 404.php.
Share on Facebook
