{"id":1864,"date":"2010-09-30T09:54:21","date_gmt":"2010-09-30T16:54:21","guid":{"rendered":"http:\/\/www.ait-pro.com\/aitpro-blog\/?p=1864"},"modified":"2011-02-26T15:58:15","modified_gmt":"2011-02-26T22:58:15","slug":"hide-fatal-error-call-to-undefined-function-get_header-error-message","status":"publish","type":"post","link":"https:\/\/www.ait-pro.com\/aitpro-blog\/1864\/misc-projects\/wordpress-tips-tricks-fixes\/hide-fatal-error-call-to-undefined-function-get_header-error-message\/","title":{"rendered":"Hide Fatal error: Call to undefined function get_header() Error Message"},"content":{"rendered":"<p>The original question was regarding hiding the Fatal error: Call to undefined function get_header() Error Message that diplays your website Document Root Path when someone enters the path to your WordPress Theme index.php file.\u00a0 The solution to hiding this error that displays your website Document Root Path means that you will be turning off error reporting for your WordPress Theme index.php file.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>CAUTION!<\/strong>\u00a0 <\/span>This is not a solution to fix actual problems with your WordPress website or fix problems with your WordPress Theme.\u00a0 This is strictly for hiding the Fatal error: Call to undefined function get_header() Error Message so that your WordPress website Document Root path is not displayed or exposed to the World.<\/p>\n<p>Example of the error message:<\/p>\n<pre><strong>Fatal error:<\/strong> Call to undefined function get_header() in <strong>\/home4\/xxxxxxxx\/public_html\/xxxxxxxxx\/wp-content\/themes\/xxxxxxxx\/index.php<\/strong> on line <strong>1<\/strong><\/pre>\n<p>Solution:\u00a0 Add this line of code\u00a0first at the very top of\u00a0your WordPress Theme index.php file before any other code.<\/p>\n<pre>&lt;?php ini_set('display_errors', 0); ?&gt;\u00a0<\/pre>\n<p>Example result is a blank page without displaying your WordPress website Document Root Path:\u00a0 http:\/\/www.ait-pro.com\/aitpro-blog\/wp-content\/themes\/AITpro\/index.php<\/p>\n<p>If you run into problems with your WordPress theme in the future and need to view error reporting for your WordPress Theme index.php file then you will have to comment out this line of code as shown below to troubleshoot the problem or code error.<\/p>\n<pre>&lt;!-- &lt;?php ini_set('display_errors', 0); ?&gt; --&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The original question was regarding hiding the Fatal error: Call to undefined function get_header() Error Message that diplays your website Document Root Path when someone enters the path to your WordPress Theme index.php file.\u00a0 The solution to hiding this error that displays your website Document Root Path means that you will be turning off error [&hellip;]<\/p>\n","protected":false},"author":167,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[13],"tags":[290,289,288],"class_list":["post-1864","post","type-post","status-publish","format-standard","hentry","category-wordpress-tips-tricks-fixes","tag-hide-call-to-undefined-function-get_header","tag-hide-wordpress-document-root-path","tag-hide-wordpress-theme-fatal-errors"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts\/1864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/users\/167"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/comments?post=1864"}],"version-history":[{"count":0,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/posts\/1864\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/media?parent=1864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/categories?post=1864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ait-pro.com\/aitpro-blog\/wp-json\/wp\/v2\/tags?post=1864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}