Error Page Text

Where do you edit the text that appears on an error page:

https://fparker.com/about.php

Its text is

Oops!
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.

Is there a way to control how the search page results look, I just wanted to remove the sidebar?

Thank You

Hello @rocketboy,

Thanks for writing in!

Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Once you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?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(); ?>

You can change the text in the code above.

3] Save the file named as _content-404.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/framework/views/global/

You will need to create the folder path since it does not exist yet in your child theme.

1 Like

Thank you for your input, I understand. Since this will be a temporary fix (needing to update with old pages still in search engines that should be removed within the coming weeks) where is this text in the current template/theme? It will be okay if its overwritten in the future because this is a temporary issue.

Thanks!

Hello @rocketboy,

The file can be edited in the parent theme wp-content/themes/pro/framework/views/global/.

Hope this helps.

That does help, thank you for your assistance. Is there anyway to remove the oops title? I didn’t see that code inside 404 file.

Hello Bryce,

Thanks for updating the thread.

You can find the code under /wp-content/themes/pro/framework/legacy/cranium/headers/views/ethos/_landmark-header.php. Please copy the file under child theme in the same order. You may need to create additional folders. Code should look something like this:

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

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
      </header>

Another options is to add following code to hide the title under Pro > Theme Options > CSS to hide the title:

.error404 .h-landmark {
    display: none;
}

1- I have found the proper CSS code selector using the Chrome browser Developer Toolbar: https://www.youtube.com/watch?v=wcFnnxfA70g

2- For the CSS code itself, I suggest that you get started with this tutorial: https://www.youtube.com/watch?v=yfoY53QXEnI

Thanks.

1 Like

Thanks a lot for your help!

You are most welcome. :slight_smile:

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