AJAX load more posts not using correct category and repeating the same few posts
I solved the issues this way: In my functions.php file, I added the following code: if (empty($cat_id)) { $cat_id = array(3, 4, 28, 35, 353); } In my second AJAX function like so: function afp_load_more() { $cat_id = $_POST[‘category__in’]; if (empty($cat_id)) { $cat_id = array(3, 4, 28, 35, 353); } …etc So that when the … Read more