FacebookTwitter

How to Customize 404 Page in Thesis

By on Dec 14, 2010 in Thesis |

Share On GoogleShare On FacebookShare On Twitter

404 errorNo one likes the 404 page this is shown when user is searching for something and there is nothing related to that in your blog or website and a page displays saying the requested page that doesn’t exist.Normally the user will hit the back button of the browser to go back or close the window, so as a result you will loose a huge amount of good traffic.

You can customize 404 page in Thesis to some some possibly related content on your 404 error page to your visitors so they will not leave our website or blog and visitors will still stick to your blog or website.For doing this you will need a plugin called Smart 404 download the plugin from here.

Below are the steps to customize 404 page in Thesis theme:


/* Custom 404 Hooks */

function custom_thesis_404_title() {

?>

The Page you requested is somewhere here.

<?php

}

remove_action('thesis_hook_404_title', 'thesis_404_title');

add_action('thesis_hook_404_title', 'custom_thesis_404_title');

function custom_thesis_404_content() {

?>

<p>Can't find what you looking for?</p>

<?php if (smart404_loop()) : ?>

<p>Check out These related posts:</p>

<?php while (have_posts()) : the_post(); ?>

<h4><a href="<?php the_permalink() ?>"

  rel="bookmark"

title="<?php the_title_attribute(); ?>">

<?php the_title(); ?></a></h4>

  <small><?php the_excerpt(); ?></small>

<?php endwhile; ?>

<?php endif; ?>

<?php

}

remove_action('thesis_hook_404_content', 'thesis_404_content');

add_action('thesis_hook_404_content', 'custom_thesis_404_content');

You can see an example of customized 404 page in Thesis by Opening this following link

http://www.wpzest.com/error

Customizing 404 page will help you to lower down your blog’s bounce rate.