Jump to content
Sign in to follow this  
farrelldoc

Looking for error.php file in template

Recommended Posts

farrelldoc

I would like a custom error page (not 404 but when someone does something goofy), and I'm looking for an error.php file in the template, but I don't see one. Am I missing it in a folder somewhere, or is there one available with a third party? Thanks, Karen


----

Karen Farrell

Farrell Documentation

Platform Pro

WP 3.1.3

Share this post


Link to post
Share on other sites
catrina

If the error page you want to create isn't going to be a 404, I think it would still be a 404 but it wouldn't say that it's a 404 error. Does that make sense? The correct solution for creating a custom error page is here: http://www.pagelines.com/forum/topic/7909


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
farrelldoc

I'm sorry--I wasn't clear about the type of error page I was referring to. It's not a 404 error page at all but a page that a user would reach when they performed a disallowed step. Instead of receiving the standard error message: error.png I would prefer for the user to receive a page using my template instead of the page above. There is a plugin that allows this, but it makes use of the error.php file in the template, and I did not see this file anywhere. Thanks, Karen


----

Karen Farrell

Farrell Documentation

Platform Pro

WP 3.1.3

Share this post


Link to post
Share on other sites
Simon

You ahve to create the file yourself

Create an error.php in your templates, $title and $message variables will be populated

Share this post


Link to post
Share on other sites
farrelldoc

Can you direct me to a tutorial or example of how to make such a page? I'm not a php developer--just a designer, but I can follow an example--I think. Thanks! Karen


----

Karen Farrell

Farrell Documentation

Platform Pro

WP 3.1.3

Share this post


Link to post
Share on other sites
farrelldoc

Thanks for the link. Maybe what I'm looking for doesn't exist. I already have a custom 404 page. What I'm looking for is a way to replace the standard WP message in the image above. I found a plugin that can do this (http://wordpress.org/extend/plugins/mudslide-error-pages/), but it requires a file in the template that is named error.php. I don't have that file (that I could find), and I don't know what goes in it or where to put it. Are you saying that the error.php file is the same thing as a custom 404 page? If so, then I must already have one because if you navigate to a page on my site that doesn't exist, you get this: http://www.farrelldoc.com/fakepage.html. I just don't know where to look for it. :) Thanks for your help! Karen


----

Karen Farrell

Farrell Documentation

Platform Pro

WP 3.1.3

Share this post


Link to post
Share on other sites
Simon

You just create a new file in the active template folder. create error.php: ` <?php echo '

' . $title; echo '

' . $message; `

Share this post


Link to post
Share on other sites
farrelldoc

Thank you Simon! Whew! That's what I needed to know. One last question (or two)...

  • Does it matter where in the template that I place the file?
  • Do I not need the ending
    ?>

    in the file with code above?

Thank you so much for your help!


----

Karen Farrell

Farrell Documentation

Platform Pro

WP 3.1.3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×