title: Can I use a wordpress theme in new php pages?
body: <p>I'm putting together a web site that needed to include some signup and blogging capability.  Wordpress seems to be a perfect fit for that portion of the app, so I've started experimenting with it.  I see plenty of tutorials on creating custom themes so I don't expect that to be a problem.</p>
  
  <p>What I'm not able to figure out is what to do with the rest of my site.  I will have other non-blogging related php pages that will access a database, etc.  I see that wordpress has a capability for generic pages of static content, but these would need to be coded PHP pages.  I just can't find a way of having the wordpress theme apply to other php pages outside of wordpress.  I was hoping of just doing something like</p>
  
  <pre><code>wp_header();
  blah blah
  wp_sidebar();
  blah blah
  wp_footer();
  </code></pre>
  
  <p>but I'm not really seeing any examples or documentation on how this might be done.  Am I missing a key piece of documentation?</p>
  
  <p>EDIT:  The answer is to essentially copy and paste a file from the theme, with one crucial addition:</p>
  
  <pre><code>require( dirname(__FILE__) . 'path_to_wp_root/wp-load.php');
  </code></pre>
  
  <p>That sets up the wordpress environment and allows me to call get_header(), get_sidebar(), get_footer(), etc.</p>