Calling functions
-
How can I call a function that is “undefined”?
I have created a custom error message for when users do not enter required info into the comment form (try it here if you want, just hit enter with the field empty: http://www.darrenalawi.com/blog/index.php/google-vs-apple/)
The message appears as part of a small hack, and is just XHTML from:
http://www.darrenalawi.com/wordpress/wp-content/themes/darrenalawi/error.php
What I want to do is replace the XHTML for the header, sidebar and footer with call functions like:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>But whenever I swap out the XHTML in the error.php file for any of these calls, and load the page (by submtting incorrect form) I get:
Fatal error: Call to undefined function: get_header() in e:\domains\d\darrenalawi.com\user\htdocs\wordpress\wp-content\themes\darrenalawi\error.php on line 1
etc…
Can anyone enlighten me?
The topic ‘Calling functions’ is closed to new replies.