Skip to content

How to create a custom 404 page in Neve ​

Visitors see the 404 ( not found ) page when they open a URL that does not exist on your site. In Neve, this page is not a regular WordPress page, so it does not appear under Pages in your dashboard and cannot be edited from there. The theme generates it from its own code: the default "Page not found" heading, message, and search form.

You can replace the default 404 page in two ways:

  • With a child theme – copy the theme's 404.php file into a child theme and write your own content in it. This works with the free Neve theme and requires editing PHP code.
  • With Neve Pro – use the Custom Layouts module to design the 404 page visually with the WordPress editor or a page builder, without editing code.
In this article

Customize the 404 page with a child theme ​

Make these changes in a child theme, never in the Neve theme files directly. Theme updates overwrite the Neve folder, and any edits made there are lost.

1. Create and activate a Neve child theme if you do not have one yet. Follow How to create a child theme for Neve.

2. Using FTP or your hosting file manager, open the Neve theme folder at wp-content/themes/neve/ and copy the 404.php file.

3. Paste the copy into the root of your child theme folder, next to its style.css file (for example, wp-content/themes/neve-child/404.php). WordPress now uses the child theme's copy for the 404 page.

4. Open the copied 404.php file. Below the opening <?php tag and comment, it contains only three lines of code:

php
get_header();
do_action( 'neve_do_404' );
get_footer();

The default heading, message, and search form are not written in this file. They are added by the do_action( 'neve_do_404' ); line, so you will not find that text to edit here.

5. Replace the do_action( 'neve_do_404' ); line with your own content. Keep the opening <?php tag, get_header();, and get_footer(); so the page still shows your site header and footer. For example:

php
<?php
get_header();
?>
<div class="container">
	<h1>Sorry, this page does not exist</h1>
	<p>Try the menu above, or search the site:</p>
	<?php get_search_form(); ?>
</div>
<?php
get_footer();

6. Save the file, then open a URL on your site that does not exist (for example, https://example.com/this-page-does-not-exist) to check your new 404 page.

Create a custom 404 page with Neve Pro Custom Layouts ​

1. Create a new Custom Layout by navigating to Neve > Custom Layouts > Add new layout.

2. For the position of the Custom Layout, choose 404 Page:

3. Give a name to your Custom Layout. In this example, we've named it 'My custom 404 page'.

4. Make sure the Custom Layout is attached to the 404 Page like in the image below and click on Publish.

5. This is the part of actually creating the new 404 page. For that, you can use the WordPress editor or a page builder, which would give you more customization options.

For this example, we're using the Elementor page builder to create the page.

5. Enjoy your new 404 page.

📝 Note: Want to read more about Neve Pro? Check out the full documentation.

Useful Resources ​

Was this helpful?