404 page - change text and disable side title

Hello,

I want to do the following changes to the 404-page:

  1. The text ‘The page you are looking for is no longer here…’ should be changed. I´ve created a ‘_content-404.php’-file in my child theme and tried the script from the following thread: https://theme.co/apex/forum/t/404-error-page/1182/2
    But it doesn´t work. Could you please tell me what´s the reason for this?

  2. I want to disable the side title ‘Ooops’. It should disappear completely. How can I achieve this?

Thanks a lot in advance.

Best regards,
Christine

Hello @christine-i,

Thanks for writing in! :slight_smile:

  1. You forgot to create /global folder. Go to x-child/framework/views/, create global/ folder and move your _content-404.php file inside.

  2. Just like my colleague instructed on the other thread, kindly copy this file x/framework/legacy/cranium/headers/views/integrity/_landmark-header.php to your child theme. Then check line 89 with this code:

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

Under that line, update your code to:

  <!--<header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php //_e( 'Oops!', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php //_e( "You blew up the Internet. ", '__x__' ); ?></span></p>
  </header>-->

Hope this helps.

Hello,

  1. Now it works, thank you very much!

  2. What exactly do you mean with ‘update your code’?
    Now I´ve replaced the line under ‘<?php elseif ( is_404() ) : ?>’
    The word ‘Oops’ disappears. But there ist still a space where the word ‘Oops’ has been. Is it possible to make this space dissapear, too?

Best regards,
Christine

Hi Christine,

Update your code means, to integrate the code provided above so that your changes will be updated.

To remove the space, delete the complete line of code.
<h1 class="h-landmark"><span><?php //_e( 'Oops!', '__x__' ); ?></span></h1>

Hope that helps.

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