I solved this by querying not using WP_Query but using a manual query
$myposts = $wpdb->get_results($wpdb->prepare("mysql_query_here"));
Related Posts:
- How to get the path to the current theme?
- Post meta vs separate database tables
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- Inserting Taxonomy Terms During a Plugin Activation?
- Replace audio/video enclosure with player?
- wp_mail is undefined
- How do you use the plugin boilerplate loader class to hook actions and filters?
- Contact Form 7: wp_mail doesn’t work after update to 4.6
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- How to: Rest endpoint returning empty object
- Ensuring a plugin is loaded/run last?
- Turn revisions off in plugin instead of config.php?
- Add an image gallery to a custom post type?
- Unit testing wordpress plugins with plugin options
- Create a clickable name in WP_List_Table for Plugin Admin
- Plugin development without Theme adjustments?
- How to Make a Category Always Selected?
- Script to remove all inactive widgets?
- Plugin options table,is the data serialized
- Disable $title in Plugin Options Screen?
- WordPress Localization and Templating
- DIR vs URI when defining a path to a file
- Why after a file is programmatically deleted, is there still a reference in the media library?
- Can’t we use strings defined as PHP constants if we want to translate them in a plugin?
- JS / JQuery form validation in backend admin menus
- My new WordPress plugin version is not showing up in the plugin directory. It’s been 4 days what could the problem be?
- Is using register_activation_hook required?
- Synchronize Custom post type tags to WordPress default posts tags
- Tabbed navigation for plugin options using same row in database for all?
- Ethics question: what qualifies as a fork? [closed]
- How to send email in wordpress with more than one attachments
- How can I prevent my plugin’s next version from updating one of the files?
- How to i18n text coming from the db or from an external source
- Is there an action like ‘after_register_custom_post_type’?
- How to replicate Media Library “Add New” on Plugin Settings Page
- How to get results of subcategories also?(WP Rest Api v2)
- dbDelta using Foreign key not working on update [duplicate]
- Best way to save custom css for an block
- Sending post request with wp_remote_post not working correctly
- Plugin callback page
- Plugin widget zindex changes depending on theme [closed]
- Input value from metabox is not found in $_POST after post save
- CMB2 Form Throws No Input File Specified in custom WordPress Plugin
- Input in plugin widget does not allow spaces
- Plugin templates vs Parent Theme
- Enqueue script globally
- White screen when activating plugin that sends form via WordPress
- Custom entity search and display
- Plugin README.txt isn’t updating in the Directory (stable tag is correct)
- Difficult to create unique titles and meta description?
- post_title is empty on global $post object
- WordPress shortcode using WPB_GET_IP
- Can woocommerse be used dynamically for billing from another plugin for payment processing?
- How to properly package a block plugin
- How to create post favorite function without plugins
- Mock a dependency of a WP_REST_Controller class
- Remove All Taxonomies from Post On Update
- Plugin index page code executes multiple times
- add_action pre_term_description vs. pre_category_description
- Cleaning a filename after image sideloading a url that contains `%20`
- WordPress Plugin Development- When our plugin functions call?
- wp login redirect loop reauth=1
- WordPress Plugin Authoring question about jquery and css
- Create a Plugin to Download Files from Web to Server
- Paragraph Tags removed when contents are only a shortcode
- how to show youtube comment profile pic in wordpress
- When I activate my custom plugin the menus and some styling of my site is messed up
- How to create archive page to add in menu
- Allow REST API Endpoint to specific user and hide from public
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Query String Filtering API
- Gutenberg block breaks when showing new data
- Allow contributor user role to perform copy operation PHP
- How to use own css of functionality plugin?
- Get Custom taxonomy parent with wordpress REST API
- What to do with the .git folder in a WordPress plugin during local development
- I’m including a html file in my plugin, but it can’t find its css or js files
- ajax-action.php can’t find added action
- Hide post by ‘post_category’
- OOP development and hooks
- mutiple shortcode instance on the same page
- Saving post meta
- Upgrade routine: Interaction with user confirmation
- Function not working on any file other than the main plugin file
- Pluigin Migration – I need to move a single plugin to a different website
- Action Links in Class located in Subdirectory of Plugin
- What do “and” means infront of a variable? [closed]
- Dropdown pages in Settings API
- Load JS/CSS of shortcode in post
- update_option() updating the option with an empty value?
- Fetch the input type date value via ajax
- wp_mail_from not changing from address
- Update custom settings field in plugin
- URL rewrite parameter lost (add_rewrite_rule)
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Settings API not Saving to Database or Display
- Error using @wordpress/create-block to create multiple blocks on Windows
- Load images from CDN and custom features to “Add Media” dialogue
- Saving metabox updates causing fatal error