Just to clear this up for someone that might have similar problem, everything was find with query, the problem with this was WordPress was looking for WP_Query class in namespace file, replacing new WP_Query
with new \WP_query
solved this problem 😀 thanks for help!
Related Posts:
- Query multiple custom post types in single loop
- The correct method to pass query vars in AJAX using ajaxurl
- How to create a WP_Query to search the Title or Tag?
- 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
- Display related products with custom output
- How to get to a specific position in wp_query?
- Why is variable not working on custom sql query using wpdb?
- Can’t search posts using WP_QUERY inside AJAX Function
- Any possible way to make $wpdb->get_results() return anything else than array?
- get current custom post ID by WP_Query method
- Create WP_Query to search for posts by their categories or their parent/child categories
- WP Query with custom Shortcode
- WordPress, AJAX and pre_get_posts using conditional tags
- How to add div blocks after certain set of post
- How to overwrite orderby with add_query_var
- Can I make get_users() query global?
- How to display SQL query that ran in WC_Order_Query?
- Shortcode to pull posts
- How to hide posts of a specific custom category in WordPress?
- Post not populating for custom post type based on category selection
- How to get post category list as select in front-end?
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- WordPress Conditional / Multiple Taxonomy Query
- How can I modify this code to make the search box include tags and meta
- 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
- My Custom Post Type AJAX Query is Returning no posts – why?
- 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
- Offset with ajax load more posts duplicates
- wordpress query returning unexpected results
- Custom Post type Ajax search results
- Query doesn’t display text data with apostrophes
- Include search tags and users in my search results system
- How can I display a query in a page?
- WP_Query based on another query on the page
- Does wp_query and query_posts affect website performance? [duplicate]
- Ajax Load More or View More functionality for woocommerce category layout by template overriding
- wp_query on search results page showing all results every time
- Show post like this image in my newssite [closed]
- Three different queries on same page
- AJAX WP_Query’s order and orderby parameters not working
- 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 get a list of all possible values of a specific user meta key?
- 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
- Get stock by custom meta field on all Woocommerce variable products
- 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?
- 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?
- Custom filter in admin edit custom post type responding with invalid post type?
- 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”
- How to make drop down post title
- Ajax not working es expected (Returns 0)
- only delete post within query / for each statement (front end)
- Create onClick Event to Re-load a Widget
- Accessing the database from a plugin outside of action hooks
- Echo a hierarchical list of post data from custom fields
- 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
- Storing Array from returned database query and using the array in a new query
- 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()
- ajax, right way to do it and make it works?
- If Query In Sidebar
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- mysql query from wordpress page using custom table
- Compare post-IDs within WP_Query? (Less than / Greater than)
- Using ajax with paging and a custom sub-query
- WordPress 3.2 query_posts and pagination, permalinks issue
- only show container with next/prev links if they exist?
- Ajax load more posts with multiple tax query
- Ajax call not working
- What query string parameter is available for index.php, that works for both pages and blog articles?
- ACF: how do I get the fields and its values of a specific group?
- 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