Post current post type to my Ajax
To pass the current post type to your AJAX request, you need to modify your JS to include the post type information in the AJAX request. You can achieve this by adding the post type as a parameter when calling the filterPosts() function JS import Alpine from ‘alpinejs’; Alpine.data(“filterPosts”, (adminURL, postType) => ({ posts: “”, … Read more