Im trying to include the wordpress header and footer in a non wordpress php file.
i used <?php include 'filepath' ?>
and im getting Fatal error: Call to undefined function language_attributes().
i checked the header file, and this is what i find on the specified line:
<html <?php language_attributes(); ?> xmlns="http://www.w3.org/1999/xhtml">
if this unspecified language attribute is a fatal error, why does it work in wordpress?
after trying to include functions.php i get other errors
what do i need to include to get this to work?
That is because the function is never defined because you are not actually running Wordpress. The header and footer files are intended to work with Wordpress. Including them into a non-Wordpress script isn't going to work. My guess is that you want to incorporate the style of your Wordpress into other areas of your site. Is that correct? If so, you are going to have to strip out the HTML you need without the Wordpress-specific code and put it in another file and include that file, not the Wordpress header or footer.