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
- Best Practice for PHP
- Adding “Remember Me” in custom login
- Retrieve POST data from AJAX call
- Using wp_send_json to return HTML
- Redirect to Page after Post Submit
- How to find objects by terms
- How to get user by display_name with WP_User_Query
- Constructing a custom login form using ajax
- WP_Query sort using multiple numeric meta values
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Sending jsPDF documents to the server
- WP_Query loop, does not display special characters in title correctly
- Remove query string specific key value
- How to Fetch values from WP database based on selected option value by onchange using PHP?
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Checking for new message using AJAX and PHP. Server overload?
- Trying to get a PHP variable defined in a custom post into a javascript file. Null value. Using wp_localize_script
- inserting a post from an extern php file but post content doesn’t show on wp site
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- Display an image if odd number of posts in grid
- HTML escaping data with ajax requests
- Why doesn’t PhotoSmash plugin play well with wp_query?
- How to deal with too many $_POST variable conditions from ajax request at backend? [closed]
- get_the_ID() doesnt work
- Get related product based on subcategory selected from category id with ID 142
- WP_Query with AJAX returning empty array
- How can I split my query result in 2 arrays?
- Is there a hack for using is_page() within the function.php file?
- How do I check if there is a tag in the title
- Submit form to db
- Using multiple variables to assign categories to an array
- the_post(); prints out style text into my HTML?
- Can not call .php files after switching to %postname%
- custom mailchimp form using HTTP API
- WordPress ajax filter returning all posts when it should be filtering by category
- How to display last whole post on the homepage
- Let user select the number of posts shown per page jquery error
- Prepared DB Query from _POST array
- Custom HTML form using PHP – help with ajax/username validation
- AJAX Returning Way Too Many Posts
- WordPress AJAX load post metadata in modal
- wordpress ajax return 0
- Modify category archive page loop on functions.php
- List of child pages fetch next results at link click
- Check if values exists DB
- Trying to exclude posts from a category on the home page
- reorder a WP_Query, using a dropdown
- Custom query_posts() parameter
- AJAX & PHP | Call a specific PHP function from a PHP file via AJAX?
- Load php function with AJAX on modal window
- How to modify this function to exclude also the post belonging to a specific category?
- Display biography post for today’s birthday person
- How to sort search result by post_title, then by post_content