The error Uncaught Error: Call to undefined function get_header()
usually happens when the Divi theme has not been correctly installed, some of its core files become bugged, a 3rd party plugin conflict, or an incorrect child theme.
Reinstall the Divi theme
Download a fresh copy of Divi from your Elegant Theme's account
Go to WordPress Dashboard → Appearance → Themes → Add new
Choose the
zip
file downloaded at step 1Install Divi
Note: Since Divi is already installed on the server, WordPress will display the following message: This theme is already installed.
Click on Replace active with uploaded button.
Ensure that the error is not a 3rd party plugin conflict or Child Theme conflict
Go to WordPress Dashboard → Divi → Support Center
Enable the Safe Mode
Check again and see if the error still appears
Note: While the Safe Mode is active, all 3rd party plugins, child themes and any other custom code will be deactivated. This only applies to the currently logged-in user. The website's visitors will not be affected by the Safe Mode being active