Found the solution in case anyone is having the same problem. Before the Query call I ran:
remove_all_actions('pre_get_posts');
Related Posts:
- Passing JSON data from WP Query into AJAX causing NULL errors
- AJAX / Read More: multiple check_ajax_referer() and wp_create_nonce() not working independentely
- Why is this Ajax not working?
- Can’t search posts using WP_QUERY inside AJAX Function
- get current custom post ID by WP_Query method
- WordPress, AJAX and pre_get_posts using conditional tags
- unable to use ‘new WP_Query’ in AJAX call
- Post not populating for custom post type based on category selection
- How to get post category list as select in front-end?
- WordPress Search Ajax + Isotope + InfiniteScroll
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Load more posts using AJAX based on posts inside WP_Query
- How to call my PHP function with AJAX ? wp_query
- Ajax filter with loadmore button
- Custom Post type Ajax search results
- Include search tags and users in my search results system
- wordpress ajax return 0
- WP_Query based on another query on the page
- Ajax Load More or View More functionality for woocommerce category layout by template overriding
- have_posts() execution failure
- How to run JS, PHP and etc. inside WP post?
- How to filter posts by post format “standard” from wp-json api?
- Why is variable not working on custom sql query using wpdb?
- Trying to implement Ajax comments in WordPress, getting WP error
- How to test nonce with AJAX – Plugin development
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- How to query for pages/post depending on slug?
- Woocommerce add to cart quantity buttons with AJAX
- How can I use wp_query to show all product data using just the products ID?
- Why is the post meta[] empty when I make a call to the wordpress rest api?
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- class click counter save number
- Random order of WP_Query results with highest meta value
- Custom page archive query by url var calling page twice on one of my custom queries?
- Any possible way to make $wpdb->get_results() return anything else than array?
- WordPress custom slug (endpoint) and compare all links
- get post based on category chosen in drop down – The ajax method
- Why is $_REQUEST an empty array in admin-ajax.php?
- Checking for new message using AJAX and PHP. Server overload?
- How to query for posts with a null or blank post_name?
- WordPress pagination not working with search page
- AJAX request status 200 but no actual “response”
- WooCommerce – Email admin with new user details
- How to make drop down post title
- Ajax not working es expected (Returns 0)
- Create onClick Event to Re-load a Widget
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Using foreach loop breaks
- Load a page into a div with Ajax
- Creating a Multi-Level Associative Object Using AJAX
- Create WP_Query to search for posts by their categories or their parent/child categories
- WP Query with custom Shortcode
- wp_query with cat not working
- wordpress count link clicks by ip address
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- How to use an associative array in post__in with WP_Query?
- Ajax – Call to undefined function get_option()
- Correct folder permissions?
- ajax, right way to do it and make it works?
- If Query In Sidebar
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- Selectbox in admin panel function linking to CSS
- Compare post-IDs within WP_Query? (Less than / Greater than)
- Ajax load more posts with multiple tax query
- Ajax call not working
- How to store data from multiple forms using ajax and php
- WordPress Sending data to Ajax with select option
- PHP 8, AJAX mail form to function.php doesn’t work
- How to use $query->set with post__in?
- WordPress ajax doesn’t display object method on jQuery .change() function
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- Ajax loaded form replaces form action with Ajax url
- Ajax category filtering products default show all
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Status 400 for AJAX POST Request with admin-ajax.php
- Sort custom meta column by other meta value
- Problem with custom plugin using AJAX to pull info from php file
- Gutenberg block – Save PHP function’s output as HTML?
- Ajax random number always the same
- Call a PHP Function with Multiple Parameters that is outside the AJAX Handler
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- Loading the same WP_Query in two different wordpress .php templates
- How to prevent WP_Query function from returning all posts when empty?
- Dynamic content based on a URL parameter
- Display a specific category of products in shop page and disable code for specific actions
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Ajax date_query not working past the first iteration
- How to get original custom taxonomy slug after the slug has been rewritten?
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Why ajax doesn’t work on certain wordpress hooks?
- Repeating admin-ajax.php not found error in admin
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Add more button if more 8 items
- How to store post ID’s in cookie or session to display the same posts later
- AJAX pagination, update current page
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- dynamic dependent select dropdown