The iNove 404 error page does not fit with the rest of the theme; but it really easy to create an iNove-themed 404 error page.
You will learn how to change your default iNove 404 page (below left) to an iNove-themed 404 page (below right).
Start by locating the wp-content/themes/inove/ directory of your WordPress installation. Rename–rather than delete–the current 404.php file in case you later want to return to the default error page.
We’re going to base the iNove-themed 404 error page on the main index.php file. This way, we get the themed layout of the header, the sidebars, and the footer for free. Make a copy of the index.php file and rename the copy, 404.php.
The main section of the code in iNove’s index.php file loops through each post and displays its title and summary. This code begins with these lines:
<?php if (have_posts()) : while (have_posts()) : the_post();
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><a class=”title” href=”<?php the_permalink() ?>” rel=”bookmark”><?php
and ends with these lines:
<?php _e(‘Sorry, no posts matched your criteria.’, ‘inove’); ?>
<?php endif; ?>
Locate this code in your new 404.php file and replace it with code that displays your 404 error message. You’ll need to format your 404 error message like a regular post using the following code.
<p>You might have stumbled here by accident or the post you are looking for is
no longer here.</p>
<p>Please try one of the following:</p>
<li>Hit the “back” button on your browser.</li>
<li>Return to the <strong><?php bloginfo(‘title’); ?></strong> <a
href=”<?php bloginfo(‘url’); ?>”>homepage</a>.</li>
<li>Use the navigation menu at the top of the page.</li>
I’ve highlighted the code I use for my 404 error page in blue. My code displays the error message as the post title between the <h2> tags, and displays an unordered list of suggestions to recover from the error between the <ul> tags.
After substituting your own error message code, test your new 404 error page by visiting a post or page on your WordPress website that doesn’t exist.