404 Error Page

Is there any easy way to change the Ooops! message on 404 Error page. Obviously I can deploy the Custom 404 plugin but in the interest in best-practice I try to limit the number of plugins I use; surely there an easy customisation for this standard message.

I am using a child theme btw.

Thanks

John

Hi John,

in your child theme create a file under /framework/views/global called _content-404.php. You can then add the following:

<?php

// =============================================================================
// VIEWS/GLOBAL/_CONTENT-404.PHP
// -----------------------------------------------------------------------------
// Output for the 404 page.
// =============================================================================

?>

<p class="center-text">
<?php _e( 'The page you are looking for is no longer here, or never existed in the first place (bummer). You can try searching for what you are looking for using the form below. If that still doesn\'t provide the results you are looking for, you can always start over from the home page.', '__x__' ); ?>
</p>

<?php get_search_form(); ?>

Change the message as required, this file will override the same file in the parent theme.

Thanks!

Brilliant, thanks Jack, that worked perfectly.

What about changing the Oops! Title?

Thanks

John

Hi there,

Locate the file _landmark-header.php under the following path
x/framework/legacy/cranium/headers/views/integrity/_landmark-header.php

Then check the line no 92, which is under the following section.

<?php elseif ( is_404() ) : ?>

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.