How to Add a Custom 404 Page in WordPress Using Atahualpa

What is a 404 Page and Why Do I Want a Custom One?

A 404 page is the page that’s displayed when someone tries to access a page on your site that doesn’t exist. Maybe it once did and doesn’t now. Maybe it moved. Maybe it never existed. Whatever the case, the visitor to your site is lost and needs a helping hand.

The default page that shows is pretty boring. It’s not entirely unhelpful, because it still shows your header and sidebar(s), but it’s not as helpful as it could be.

One excellent use for a 404 page is to direct users to little-trafficked content that you still think is very, very good. Maybe you want more love for that post you wrote about your fluffy bunny (so fluffy!). You can add a link to it on your 404 page.

Now, if Atahualpa was as user-friendly as it usually is, there would be a spot in the theme options to edit the 404 page. But. There isn’t.

In fact, Atahualpa doesn’t even have its own 404.php file, which is the heart of the matter.

So, here’s the trick. (You’ll need FTP or shell access.)

Short Version

* Copy the 404.php file from the TwentyThirteen theme.

* Edit it.

* Put it in the Atahualpa theme folder.

Long Version – FTP Style

* Find your way to wp-content/themes/twentythirteen

* Download the 404.php file to your computer

* Edit the 404.php file on your computer using Dreamweaver, TextPad, whatever editor you like

* Upload the edited 404.php file to wp-content/themes/atahualpa/

Long Version – Shell Style

* cd wp-content/themes/twentythirteen

* cp 404.php ../atahualpa/

* cd ../atahualpa

* pico 404.php (Or the editor of your choice if you’re not a fan of pico.)

But I Don’t Have TwentyThirteen!

That’s fine. You probably have TwentyTwelve or TwentyEleven or another theme installed. You can borrow it from whichever theme you have that has one. TwentyThirteen comes pre-installed on most new installs of WordPress, which is why that’s the one I referred you to. Plus, that’s the one I just used.

I hope this helps you! Let’s all spiffy up our 404s!

Comments are closed.