WordPress 404 page in Ultimatum Theme

If you don’t want to serve visitors to your site the standard WordPress 404 page, this is how to customize what they see using settings in Ultimatum Theme. With this framework, there is no ‘themed’ 404 page, instead you are expected to make your own, and you should. So, what is a 404 page? Well, a user requests a page from your website but your database cannot find it and so WordPress shows this error message page.

So, over to Ultimatum Theme. You should already be familiar with layouts in your child theme, so let’s go straight to the child theme layouts panel in your backend admin. Select the child theme name => Templates => Layouts (of the template that you are using if you have more than one template) => Add New. I have called my new layout Error 404. It is a Full layout, and I then save. The next screenshot shows how to add a new row to the layout, in this case I chose a 100% row. The third screenshot above shows the resulting layout, with the header and footer already dragged and dropped into place, and the WordPress Text Widget about to be dropped into place.

The first screenshot above shows the content of text widget (see below for the sample code). Once this has been saved you can click the ‘Back to Layouts Screen’ button. The final thing we need to to is assign this layout to the WordPress core 404 page. So, click the ‘assign Layouts’ button and select the Error 404 layout and Post/Page Type set as Core => 404. The resulting layout panel will look like the third screenshot above; that’s the layout done.

1
2
3
4
5
6
7

<h2class="entry-title">Oops! This is not the page you wanted</h2><divclass="entry-content"><divclass="error-details"><p>Sorry, an error has occurred: requested page has not been found!</p></div><divclass="error-actions"><p><aclass="btn btn-primary btn-lg btn-icon"href="http://www.mysitename.com/"><iclass="fa fa-home fa-lg"></i>Take Me Home</a><aclass="btn btn-default btn-lg btn-icon"href="http://www.mysitename.com/contact/"><iclass="fa fa-envelope fa-lg"></i>Contact Support</a></p></div></div>

We also need a small bit of custom css (don’t we always!). Note that as my theme uses Bootstrap, I have taken advantage of some Bootstrap css selectors as well. This post shows you how to do this in Ultimatum, if you don’t already know how. This is the new css to copy and paste:

You may need to preview the page and use the code inspector to see what class name Ultimatum Theme gives the <body> tag for your layout (there are quite a few classes used, but a quick look will reveal it for you, in my example above the class name Ultimatum used was ut-layout-error-404). The finished page can be seen above.