1. Go to this page and download the library: Download motiontactic/wp-ajax library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$args = [
'action' => 'get_posts', //ajax action name used by JS to address this query
'output_template' => false, //blade template location for the output html
'pagination_template' => false, //blade template location for the pagination html
'pagination_pages_to_show' => 9, //Used in the pagination array creation
'