loading
I currently have availability
logo

Hi, I'mKevin Shoffner

Genesis 404 Custom Page

But what is a 404 Error Page?

It’s the page where one of your visitors will eventually end up because they typed something wrong, or a link has gone bad on your site.  But don’t make them feel bad, blame yourself and get on with it.  Here is one to look at: kevinshoffner.com/awesome-sauce

Cool, but can I create one to fit my site’s “look and feel?”

With Genesis, you only need to do two short tricks and you are ready to go! But you are forced to read this entire article first.

Trick #1

If you don’t want to do anything “real custom” for your site then just move the default 404.php file that is in the Genesis template folder to your child theme, and upload. Wow, that was pretty painless!

 

Trick #2

But if you want to get “real custom” you can do all types of fun things.  Here are just a few ideas

Adding an image to your 404.php file  – just add the following to your Child Theme functions.php file, near the bottom of the file
add_action('genesis_before_post', 'child_404_image');
/**
* Add an image to the top of the 404 page
*
* @author K. Shoffner
* @link https://kevinshoffner.com
*/
function child_404_image() {
if( is_404() )
echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/404.png" alt="OOPS, Nothing Found" />';
}

Save and Upload your functions.php and your customized 404.php file.
Then upload your image you created called 404.png, and you are done!

Make your friends jealous today.

1 comment
  • Customize your wp_get_archives() in WordPress – Kevin Shoffner | September 20, 2013

    […] your 404.php or archive.php file and let’s get started.  Disclosure, I did use a Genesis child theme when […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: