In ProcessWire, when making an AJAX request, you can set this in the a template file:

<?php if (!$config->ajax) include('./head.inc'); ?>

Is there an equivalent for WordPress?

<?php get_header(); ?>

Read more here: WordPress – not including header/footer in AJAX request


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: