404 page without wrapper

That’s probably an easy one, but I can’t figure it out right now:
How do I create a 404 page which is entirely different from the other templates? Not using any headers or footers? Editing the 404.php does still use normal headers and footers.


Copy base.php and rename it base-404.php. You can then edit the new base template as required.

1 Like

Thanks @Foxaii - that does the job perfectly!

I created the **base-404.php ** for create a redirect from 404 to my homepage.
I did it as usually do
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>
but it looks like the base-404.php doesn’t exist, it gives me a page with “not found” + the footer.
How can I solve that? (my intention is to redirect all 404 to the home)

You need to have a base-404.php and a 404.php template. Or just use an action hook instead.