Spicoli invades WordPress!

by Angelique on January 21, 2010

You can’t blame the guys at WordPress for wanting to have some fun. Why create a generic 404 page — the one people get when they type in the wrong address or click an outdated link — when you can indulge in a little creative expression?

Yesterday I discovered that if someone were to try to reach an AFMarCom website page that was malfunctioning or nonexistent, they would see this:

The text says:

“You 404â€™d it. Gnarly, dude.

Surfinâ€™ ainâ€™t easy, and right now, youâ€™re lost at sea. But donâ€™t worry; simply pick an option from the list below, and youâ€™ll be back out riding the waves of the Internet in no time.

* Hit the â€œbackâ€ button on your browser. Itâ€™s perfect for situations like this!
* Head on over to the home page.
* Punt.”

Cute, eh? But the problem is, this message is wrapped up in the middle of my layout, my images and my info. It looks for all the world as if I wrote it, and I don’t want to make the wrong impression on clients. Yes, I’ve posted some silly things — one of the Twitter “users” in Bad Ways to Thank People for Following You is SuperPuppy — but it’s my silliness, which better reflects my company and services.

So what to do? Well, on the WordPress platform you can change the 404 error page any way you like. Here’s how you do it, courtesy of Godhammer from the DIYThemes, the Thesis support forum.

First, find your custom_functions.php file, make a copy, and put it somewhere safe. Call it custom_functions-original.php.

Next, open the custom_functions.php file and paste this at the bottom. You don’t have to put it between any tags or anything.

Note: I am SO SORRY that you cannot cut and paste this, but WordPress keeps removing half the code when I try to post it! You can download this so it’s easier to reference.

Then change the TEXT HE’S WRITTEN IN BOLD, remove #sidebars { display:none; } if you want your sidebars to show, save the file and upload it. If you use the Thesis theme for WordPress, you’ll probably find it here: /youraddress.com/blog/wp-content/themes/thesis_16/custom

Here is my result:

It says,

“We’re sorry, but it seems that we can’t find your page!

This is an official 404 error. Are you sure that you entered the correct address? If you know that the address is correct, but you still don’t see the page you want, please let us know at info@afmarcom.com.”

While I was at it, I made sure I had a nice subscription-confirmation page for those who sign up for my weekly email digest. Just enter a name and an email address in the tall red-and-white box to your right, and you’ll receive a digest of links to posts, articles, websites and tweets every Friday.

So in conclusion: If you have a webmaster to care for your website or blog, tell him or her to make you a polite 404 page. If you want to do this yourself, the above code should work. And please sign up for my weekly digest!

Have more questions about this subject? Need help establishing a social network presence for your product or service? I can help you! Contact me at info@afmarcom.com or 602.735.3107.