Chadwick
Member
Posted 7 years ago #
how can i make one template that will display the 40* error automaticly, but use a certian formatting, that i have set for it. I think this could be easy but i'm not to far along in my own php programming so it will be a bit difficult to do it myself.
Check out how the 404.php is done in the default template.
Chadwick
Member
Posted 7 years ago #
yeah but that only does it for the 404. I want it so it just knows what the error is and displays the text for the 404, 403 or whatnot.
Chadwick
Member
Posted 7 years ago #
You'll be the first, so you'll have dissect the default theme and see how the 404 is setup. Good luck!
Chadwick
Member
Posted 7 years ago #
oh fun...
What should I be looking for, Mainly which file...
There's no functionality built into WordPress for this. But if you really want to try it (and I'm not sure how successful it would be on 403 - forbidden errors), look at how to set up error documents through .htaccess:
http://www.javascriptkit.com/howto/htaccess2.shtml
Offhand I'm not sure how you'd plug this into WP's theming feature.
.htaccess ErrorDocument pointing to index.php with a custom query argument (?error403=1 for example) in combination with custom templates might do the trick.