• Resolved Jim

    (@kernix)


    I created a basic 404 page and I have a 44.php file but the 404 page I created is not using 44.php, it’s using page.php. Also, the slug for the page I created defaulted to 404-2 even though my title is 404. So I removed the -2 from the slug and there it is – a blank 404 page using 404.php but that page is NOT editable nor can it be found in the pages listed in the admin dashboard. Where is it coming from and why does the admin top menu on the front end not have an edit link?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I created a basic 404 page

    I’m not sure what you mean by creating a 404 page.

    The 404.php file is to be used when you visit a URL which does not exist (ie when the address is wrong).

    So, if you create a PAGE yourself, then irrespective of what you call it or what slug you give it, your page would exist, and the 404.php file will NOT be used.

    If you’re trying to customize what is displayed when a page cannot be found, you’ll need to add your customizations to the 404.php file itself.

    Here’s a handy guide: https://codex.wordpress.org/Creating_an_Error_404_Page

    Of course, plugins exist for this. There are plugins that allow you to design a custom “404” page from the dashboard, and there are plugins that will allow you to designated ANY page to be used as the 404 page. What these plugins do, in essence, is intercept “404 file not found” responses from the server, and instead of allowing WordPress to use the 404.php file, display their own or designated page.

    Thread Starter Jim

    (@kernix)

    Thanks, I just noticed that the content is hard coded in the PHP file. I thought it was like home.php where you create the page and the main blog page uses that template. I added my content to 404.php so I’m good – sorry to waste your time on something that basic.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘404 page not using 404.php’ is closed to new replies.