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.
Ah, theme, not script. thank you 🙂
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.
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?
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.