Title: Uncaught Error: Call to undefined function language_attributes()
Last modified: March 29, 2018

---

# Uncaught Error: Call to undefined function language_attributes()

 *  Resolved [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-language_attributes/)
 * I seem to be getting these appear in my error log, but only recently and I’ve
   been running WordPress sites for years.
 * `PHP Fatal error: Uncaught Error: Call to undefined function language_attributes()
   in /home/public_html/wp-content/themes/sitetheme/header.php:2`
 * My header is
 *     ```
       <!DOCTYPE html>
       <html <?php language_attributes(); ?>>
       <head>
       ```
   
 * Any ideas or help would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [8 years, 2 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-language_attributes/#post-10177654)
 * Please attempt to disable all plugins, and use one of the default (Twenty*) themes.
   If the problem goes away, enable them one by one to identify the source of your
   troubles.
 * If you cannot access the dashboard, there are other ways to [deactivate plugins](https://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F).
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-language_attributes/#post-10178236)
 * Well, I seem to have resolved it. If I have this code:
 *     ```
       <?php
       /**
        * The template for displaying the header
        *
        * Displays all of the head element.
        *
        */
       ?><!DOCTYPE html>
       <html <?php language_attributes(); ?>>
       <head>
       ```
   
 * Then it works perfectly with no errors!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Uncaught Error: Call to undefined function language_attributes()’ is 
closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [greencode](https://wordpress.org/support/users/greencode/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-language_attributes/#post-10178236)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
