'publish',
'p' => $_POST['post_id']
);
$response_html = '';
$pluto_post = new WP_Query( $args );
if ( $pluto_post->have_posts() ) {
while ( $pluto_post->have_posts() ) : $pluto_post->the_post();
$response_html.= '
';
ob_start();
$forse_single = true;
// get_template_part( 'single-content', get_post_format() );
include(locate_template('single-content.php'));
$response_html.= ob_get_clean();
$response_html.= '
';
endwhile;
}
if($response_html){
echo wp_send_json(array('status' => 200, 'message' => $response_html));
}else{
echo wp_send_json(array('status' => 404, 'message' => esc_html__('No posts found', 'pluto')));
}
}else{
echo wp_send_json(array('status' => 422, 'message' => esc_html__('Invalid data supplied', 'pluto')));
}
wp_die();
}