I have a Wordpress AJAX call that is working in as much as it is able to get raw data from a PHP file. The AJAX is using the admin-ajax.php file. However, the PHP file I need to get is within the loop of the page. Where it is being placed is where it works if it was just included on the page.
To summarize: if the PHP file being AJAXed has in it:
<?php echo 'this is the file!' ?>
…everything works fine. But if it has:
<?php the_title(); ?>
…it returns blank.
Thank you for taking the time to read this!