A Custom Thesis Theme 404 Page Which Is More User-friendly

January 19, 2010

A 404 page is basically an error page which shows up when the web-page you are trying to access is not found. Some pages go missing for various reasons — maybe the user navigated through a broken link or may be the page no longer exists. While the 404 page shows the visitor that the page they were looking for doesn’t exist, here’s a tip to make it more user-friendly. What would you want the users to do when they hit a 404 error page? A good idea is to place a search box on the 404 page so that the users can type in the search terms for the page they were looking for and see if they can get it in the search results. Here’s how you can do that.

Place the below code into the custom_functions.php file. This function will introduce a search box in the 404 page providing an opportunity for your blog visitors to search for the content.

function search404()
 { ?>

 <p>You can use this search box to look for the missing page &mdash;</p>
 <form method="get" action="http://www.binaryturf.com/">
 <p>
 <input type="text" value="To search, type and hit enter" name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" />
 <input type="hidden" id="searchsubmit" value="Search" />
 </p>
 </form>
 <?php
 }

add_action('thesis_hook_404_content', 'search404', '11');

Think over and you can present more content for your users to browse through like the most popular posts etc. Thesis is a very powerful and effective premium WordPress theme. You can buy it from DIYTHEMES for $87 or get it free with one of our WordPress blog design services.

 

Join 37,807 others and get free tutorials & tips on design & development using Wordpress on, Thesis & Genesis!

Need help with Wordpress, Thesis or Genesis?

Are you a designer or a developer looking for a hand with Wordpress, Thesis or Genesis? Or perhaps want to save time with a project? Get in touch and let's get the ball rolling! Check out our Thesis development, PSD to Thesis & other services.

Comment on A Custom Thesis Theme 404 Page Which Is More User-friendly

You can add images to your comment by clicking here.

Previous post:

Next post:

X

Wordpress, Thesis, Genesis tutorials from Binary Turf — one tutorial a day. Subscribe & sharpen your web design skills.

Name:

Email:

We respect your email privacy.