title: Template files and file structure for website
body: <p>I have a few template files (I believe this is what they are called) such as: head.php (here I keep all the info inside the <code>&lt;head&gt;</code>), nav-menu.php, and footer.php. I use php require_once to insert them wherever I need to.</p>
  
  <p>My problem arises when I create a sub folder with files in it. Let's say myDomain.com/blog/blog-post1.php. then, If I want to use the templates I need to use ../head.php but it doesn't solve the problem because the code inside head.php is not executed correctly since all the links to the CSS for example also need the "../". I have resorted to creating another copy of the header, which I know is inefficient. Is there a better way to deal with this problem?</p>
  
  <p>I have looked for answers here, but nothing seems to be the exact problem I am having. I hope somebody can help. Thanks.</p>