title: Include external php inside Wordpress Header
body: <p>I am trying to do something simple but it won't work.</p>
  
  <p>I have a custom Wordpress header. I need to include external php classes and other stuff. The problem is that if I do that the page breaks, it doesn't work anymore.</p>
  
  <p>This doesn't occur when I try to "require" external php scripts inside page templates. The problem occurs when I include it in the <em>header</em>.</p>
  
  <p>To make it shorter, I have:
  <strong>header-home.php</strong> (standard wordpress theme header file, which has to include the following file)</p>
  
  <p><strong>snippets.php</strong> (a php class)</p>
  
  <p>header.home.php is located at /wp-content/themes/twentyseventeen-child/templates...</p>
  
  <p>snippets.php is located at /resources/scripts/snippets.php</p>
  
  <p>Perhaps the header loads something that is not compatible with custom inclusions?</p>
  
  <p>I was able to include an external php file which contains pure html elements. If I try to load custom classes, the page simply breaks. The include filepath is correct, so that's not the problem.</p>