So, i found a work around for this . I just display the excerpt() and then I link them to the permalink() of this post.
// to load the result from ajax
function filter_post_asb_clone()
{
// ob_start();
$args = array(
'year' => $_POST['year'] ,
'cat' => array(42 , 43)
);
$query = new WP_Query($args);
if ( $query -> have_posts()) :
?>
<div class="container">
<ul class="display-posts-listing">
<?php while($query -> have_posts()) : $query -> the_post(); ?>
<a href="https://wordpress.stackexchange.com/questions/328651/<?php echo the_permalink(); ?>">
<li class="listing-item">
<h4><?php the_title();?></h4>
<?php
echo the_excerpt();
?>
<?php the_post_thumbnail();?>
</li>
</a>
<?php endwhile ; ?>
<?php wp_reset_postdata();?>
</ul>
</div>
<?php
endif;
exit;
}
Thank you very much