Current post in AJAX call is always zero
Replace your ajax code with this code. I didn’t check it but i think it should we working. The whole html part is convert into string so that it will send via ajax response. <?php global $post; $data = filter_var_array($_POST, FILTER_SANITIZE_SPECIAL_CHARS); if ($data[‘action’] == “timeline_load”) { $post = null; $args = array( ‘post_type’ => ‘timeline’, … Read more