
Custom 404 error page is your only chance to turn a lost visitor into a reader of your blog. Thesis Theme has a special function to handle 404 error page. It’s a semi-custom page as it does keep with your theme and design, but it only show “You 404′d it. Gnarly, dude.” to your visitors. You may want to change the wording a little bit to show your own personality and suitable for your brand image.
What Is 404 Error?
The 404 or page not found error message is an HTTP standard response code indicating that the page requested by client was not found in the server. It simply means the page you’re requesting does not exist.
In the following post, I’m going to show you how to customize your Thesis Theme 404 error page:
#1: Open custom_functions.php
Open custom_functions.php file using any text editor of your choice. The file is located at thesiscustom folder. This file is purposely for you to customize Thesis Theme without touching the core file.
#2 Adding 404 Error Page Title Action Hook
Add the following codes just below <?php in the file. The remove_action is removing the original 404 error page title while add_action is adding your own custom 404 error page title.
remove_action(’thesis_hook_404_title’, ’thesis_404_title’);
add_action(’thesis_hook_404_title’, ’custom_thesis_404_title’);
#3 Creating 404 Error Page Title Function
The following code should be added to the custom_functions.php file just below add_action code shown in step 2. The function simply prints out the 404 error page title in your browser.
function custom_thesis_404_title() {
?>
PUT YOUR 404 ERROR PAGE TITLE HERE
<?
}
#4 Adding 404 Error Page Content Action Hook
Add the following codes just below the code in step 3. The remove_action is removing the original 404 error page content while add_action is adding your own custom 404 error page content.
remove_action(’thesis_hook_404_content’, ’thesis_404_content’);
add_action(’thesis_hook_404_content’, ’custom_thesis_404_content’);
#5 Creating 404 Error Page Content Function
The following code should be added to the custom_functions.php file just below add_action code shown in step 4. This is the main function where you can customize your add in your own wording for 404 error page in Thesis Theme.
function custom_thesis_404_content() {
?>
<p>ADD YOUR OWN 404 ERROR PAGE WORDING HERE</p>
<?
}
#6 Result
Finally you can upload custom_functions.php to your web server. And you can see the result by simply enter an invalid URL of your blog.
Conclusion
Try to be creative to turn lost visitors to your blog readers. It’s easy to cutomize 404 error page in Thesis Theme. And really, I love Thesis Theme so much.
Related Posts:




{ 10 comments… read them below or add one }
Thanx a lot for the useful info. I am new to blogging and learning the basics. Keep up the good work.
@Jhangora,
Thanks for your comment. If you’re interested in reading some topics, feel free to contact me.
Hello.
I have been searching for this information and finally found it. Thanks!
Thanks for that step by step tutorial
I love how thesis lets ppl store all the code customisations in custom_functions.php because it makes Theme & Wordpress updates so much smoother
The custom_functions.php file gives so much flexibility to the entire thesis, thanks a lot ofr the brilliant tip.
Hi! Thanks for the tutorial.
I’m no php wizzard, could you tell me what i’m doing wrong?
This is my custom_funtions.php
PUT YOUR 404 ERROR PAGE TITLE HERE
ADD YOUR OWN 404 ERROR PAGE WORDING HERE
<?
}
When uploaded, it doesn’t work at all.
Thanks in advance.
I see that I incorrectly used the
tag?Could you send me an email to jplijnaer@gmail.com instead. Thanks!
Beyond the basics, literacy skills are an anachronism. ,
thanks for the tutorial..
Just wanted to say thanks for all of the Thesis posts. You site has become a sort of one-stop-shop for modifying this great framework
Karl A. Krogmann
{ 7 trackbacks }