 <p>You're probably getting that error because you are calling the theme file directly </p> <p>OR</p> <p>because you aren't incuding the header and footer of the page.</p> <p>Easy Solve:</p> <p>Make sure the page loads as wanted. If you dont want to include the header and all that junk, you can load a fragment with jQuery doing something like this:</p> <pre><code> .load('wp-content/themes/theme/reloadhomeposts.php #postWrapper', function() { $(this).removeClass('loading') }); </code></pre>