• X

    Customizing Thesis WordPress Theme 404 Error Pages

    By in Thesis Customization

    Bluehost hosting

    No one likes 404 Error pages. A 404 Error page is the requested page that doesn’t exist. When a user open a page on your blog, and that page do not exist on your blog, he will get a 404 error.

    In normal scenario user will hit the back button or close the page. The loss will be yours since you will not be getting and visits on your page.

    How to customize Thesis WordPress theme 404 Error Page

    By adding a simple code we can add style to our Thesis 404 error page, but our goal should be show some related content to your 404 error page, so that visitor will still stick to your blog.

    To achieve the desired result we need :

    Smart 404 Plugin : Smart 404 plugin will help you to customize your 404 error pages. If you don’t have Thesis wordpress theme, you can also use this plugin on non Thesis blogs.

    Download the plugin and activate it. Now Edit your custom_functions.php file which is located at Thesis > Custom folder. Add following code to customize the 404 Error page and show some related content

    /* Custom 404 Hooks */
    function custom_thesis_404_title() {
    The Page you requested is somewhere here.
    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() ?>"
    title="<?php the_title_attribute(); ?>">
    <?php the_title(); ?></a></h4>
      <small><?php the_excerpt(); ?></small>
    <?php endwhile; ?>
    <?php endif; ?>
    remove_action('thesis_hook_404_content', 'thesis_404_content');
    add_action('thesis_hook_404_content', 'custom_thesis_404_content');

    You can see an example by Opening this link


    Customizing your blog 404 Error page will ensure lower bounce rate.

    If you still missing the benefit of SEO perfect wordpress theme, I will recommend get Thesis wordpress theme or read following posts :

    Subscribe to Download WordPress Guide Worth $99

    Discover more awesome articles

    Article by

    Harsh has written 1123 articles.

    If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to Blogging tips via RSS or EMAIL to receive instant updates.

    { 14 comments… read them below or add one }

    Shanker Bakshi

    Thesis is really difficult to customize as they say, thank that few blogger like you helping other to heck it professionaly.
    .-= Shanker Bakshi ´s last blog ..Do You Want to Become Rich Overnight? =-.


    Harsh Agrawal

    That’s true Shankar at first glance it seems to be hard to customize. though with little bit of work, you can easily customize thesis and give it any kind of shape you want.



    This post reminds me to check if my new theme has the 404 file. I normally create one when the theme doesn’t have, but it slipped my mind this time.

    Everybody’s blogging about Thesis Theme, it makes me more curious to have one.


    Harsh Agrawal

    Thesis is no doubt a powerful theme, and people who are using it. They can only understand the real power beneath it. I’m sure one day when you will have this theme you will realize the meaning of words above :)



    It really feels like Thesis and Wordpress are getting more and more connected. Maybe the Wordpress team will get inspired and integrate some of Thesis functions into standard Wordpress.


    Harsh Agrawal

    I really wish if they will, but last time at word camp we had a word with Matt (Founder of Wordpress), and we talked about integrating All in One SEO with wordpress, though he prefer those independent components should grow independently. So This is something, IMO is not going to happen. but there is nothing to worry about, why to look for bits of it, when we can grab the whole package :)

    George Serradinho

    I have actually now used this code and changed it a bit so that I don’t need another plugin.
    .-= George Serradinho ´s last blog ..Premium Elegant Theme =-.


    Harsh Agrawal

    Hey George
    Will love to know the code you used, since it will be helpful to get rid of one extra plugin. Though there is one thing which I forget to mention in the post. This plugin also tries to match the post slug, and instead of giving 404 error it will open the relevant link. This will help a lot in order to narrow down the 404 error pages.
    For an example open this link :


    George Serradinho

    I just sent you an email, need to have a look at what you wanted. Will let you know if I come right.
    .-= George Serradinho ´s last blog ..Premium Elegant Theme =-.


    Harsh Agrawal

    Got your codes and I will post it here are SML with your Credit :)


    This is great Harsh, thanks! Another thing for my list of things I need to do SOON. I have posts redirected to my current blog from some old blogs, so chances are someday a redirect is going to fail and some readers will definitely land on the 404 page – which I currently just have the default that comes with Thesis.
    .-= Christie ´s last blog ..Why aren™t my trackbacks working? =-.



    I am still learning theis, which is driving me mad. Where do I put the code in the custom functions, the top, the bottom, etc. I keep getting an internal server error.



    Just customized my 404 error page. Thanks for the wonderful post.



    Thanks for that article!

    Now i’ve got a useful 404 page.


    Leave a Comment

    Previous post:

    Next post: