title: How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
body: <p>I am looking for a solution to <strong>reuse</strong> the header and footer <strong>navigation links</strong> (<strong>with style</strong>, of course) in one of my WordPress website for <strong>several</strong> other <strong>WordPress sites</strong>.</p>
  
  <p>Please note that I'm trying to share header and footer among WordPress sites, not <a href="https://stackoverflow.com/questions/6444428/wordpress-header-and-footer-into-a-php-site">from WordPress site to a PHP page</a>.
  The sites I'm referring to are on the same server. I have the following directory structure:</p>
  
  <pre><code>example.com/ #main site is here
     some-other-site/
        wp-admin/
        wp-content/
        wp-include/
        ...
     wp-admin/
     wp-content/
     wp-include/
     ...
  </code></pre>
  
  <p>I would really appreciate some direction on how to achieve this goals and best practices, if possible since I am still new to WordPress.
  I have a few ideas in mind but I am not sure which one is best programming practice or how much effort each approach requires (for cost benefit analysis)</p>
  
  <p>1) Write a custom get_header() function in the main site's functions.php to allow extraction of navigation links
  file_get_contents() to get the navigation links from wp-content/themes/my-theme/inc/footer.php
  in some-other-site/ I use</p>
  
  <pre><code>define('WP_USE_THEMES', false);
  require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php');
  </code></pre>
  
  <p>Currently, I get <code>"&lt;a href="&amp;lt;?php bloginfo('siteurl'); ?&amp;gt;/articles/category/editorial_team"&gt;Background&lt;/a&gt;"</code> as output so it doesn't work for me yet.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/7142361/how-to-make-common-header-and-footer-big-problem">one similar topic</a> but the question is a bit unclear to me and the solution of using absolute urls is not a good practice, <a href="http://techchucker.wordpress.com/" rel="nofollow noreferrer">I was told</a>.</p>
  
  <p>2) Expose those navigation links as web service. I have a feeling that web service is not even relevant here but I still put it here just in case.</p>
  
  <p>3) Use Multisite settings or create a network for all my WordPress sites. While this appears to be the best way, it seems quite complicated and there are actually issues with my main site being setup in a network currently. I doubt it's necessary to got through this complication to achieve my goal.</p>
  
  <p>As far as I know, sites in WordPress network shares certain databases and therefore I'm so afraid of losing some or whole of the huge data in my main site.</p>
  
  <p>It would definitely be relevant to point out the best practices in sharing CSS stylesheets and Javascripts file among WordPress sits as well, if you are kind enough :)</p>
  
  <p><strong>Updates</strong><br>
  I've decided to  </p>
  
  <ul>
  <li>Stick to wordpress multisite as much as possible  </li>
  <li>Abandoned the poor practice hierarchy mentioned above - nested WordPress directories</li>
  </ul>