Load Wordpress post without get_header() and get_footer()
<p>I'm developing a wordpress site where the posts are loaded in a popup with ajax (with <a href="http://dimsemenov.com/plugins/magnific-popup/" rel="nofollow">Magnific Popup</a>). The posts are using the template <code>single.php</code>.</p>

<p>This works fine, except that the header and footer are also loaded in the popup (html tags, navigation, scripts, …). I can of course delete <code>get_header()</code> and <code>get_footer()</code> from the template, but then the single post pages aren't loaded correctly via permalinks.</p>

<p>I tried conditional tags, but when the template is loaded with Ajax, it doesn't 'see' it's loaded on the homepage.</p>

<p>I think working with different templates is an option, although I have seen sites that work with the same template (like the Zoo theme on themeforest). But I couldn't figure out how it works there.</p>

<p>So I'm stuck here. Anybody?</p>