Customizing the Genesis Theme Framework 404 page is really pretty easy. Of course you can simply copy the 404.php from the Genesis theme folder into your child theme folder and make your edits there. However, I just tend to leave the bulk of the 404 page alone and add a custom image to the top of the page. It’s pretty simple to do via functions.php, though not all of the usual hooks are available. The following code will output an image before the Not Found title.
add_action('genesis_before_post', 'child_404_image'); /** * Add an image to the top of the 404 page * * @author Jen Baumann * @link http://dreamwhisperdesigns.com/?p=631 */ function child_404_image() { if( is_404() ) echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/404.png" alt="OOPS, Nothing Found" />'; }
Place the code in the functions.php file, anywhere after this:
require_once(TEMPLATEPATH.'/lib/init.php');
And before the following closing code (if it exists):
?>
Don’t forget to upload your 404.png image file to the theme images folder.