Ajax Load More Posts in Category Page
Your query parameters don’t contain any category arguments. You need to pass and set cat or category_name along with the post type, offset, and posts per page. You can get the current category’s ID via get_queried_object(): $queried_object = get_queried_object(); $cat_id = $queried_object->term_id; Output and retrieve the value somewhere in your category template, or better, when … Read more