Add “load more” functionality to an AJAX response
This is all the code to also add “load more” functionality: /* Widget name : Filtering (accommodation) Parameters : ‘cpt’ Function : filtering() */ function filtering($filtering){ $taxon = get_object_taxonomies($filtering[‘cpt’]); $terms = get_terms($taxon[0]); $accs = new WP_Query([ ‘post_type’ => $filtering[‘cpt’], ‘posts_per_page’ => 6, ‘order_by’ => ‘date’, ‘order’ => ‘desc’, ‘tax_query’ => array( array( ‘taxonomy’ => $taxon[0], … Read more