• I need to create a custom 404 page. I tried a plugin but didn’t like the end result.

    If I make 404.php, does it go in each directory? Is php the right ending?

Viewing 9 replies - 1 through 9 (of 9 total)
  • You make a page called 404.php and you place it in the root folder of your theme. Same folder that holds index.php, header.php, footer.php and so on.

    Thread Starter SickSquirrel

    (@sicksquirrel)

    Ah, theme, not script. thank you 🙂

    Thread Starter SickSquirrel

    (@sicksquirrel)

    I just read that I need to put in a line in .htaccess referencing my 404 page.

    ErrorDocument 404 /404.php

    So what would I put in my root folder .htaccess to call this up?

    /host/structure/blah/blah/blahwp-content/themes/theme-name/404.php

    Do not add anything relating to 404 errors to your .htaccess file., WordPress handles 404s internally.

    Thread Starter SickSquirrel

    (@sicksquirrel)

    Thanks! The article referred to WP and mentioned the .htaccess. It’s a shame misinformation is out there.

    I put 404.php in my folder referenced above but the 404 page that came up was a WP page, not mine. Can I edit that instead, and if so, which file?

    Have you reviewed creating a 404 error page?

    Thread Starter SickSquirrel

    (@sicksquirrel)

    I put the file under the the theme main folder as I was told. Same folder with header.php, footer.php, etc. Named it 404.php, copied code from a website either here or another WordPress site (no memory).

    Later I will be at my laptop and can paste the code here if you’d like.

    copied code from a website either here or another WordPress site

    Um – no. You have to create a 404 template file that is appropriate for your theme. You cannot use someone else’s file.

    Yes, I can! *blush* I uploaded it to the wrong theme. I just pulled it over and it’s fine.

    Right now it is on a plain white page. Eventually I’ll copy the header img over to make it look less newbie.

    I only used the code, not any elements of a theme. That’s all that is given.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘404 errors’ is closed to new replies.