I doubt that ever worked by itself. WP_Query
operates on posts database table. On the bottom SQL level to make use of post metadata you need to not only say what metadata you are looking for, but also instruct MySQL how metadata table connects to your posts table (JOIN
realm).
I would attempt to keep manipulating query arguments for starters, it doesn’t seem like your conditions are that complicated (from what you quoted at least).
PS also don’t forget to remove your filters after, or you are messing up other queries.
Related Posts:
- How to modify posts_where filter only for the search query
- Search pre_get_posts filter which can handle multiple post types and categories?
- Sorting and limitation with pre_get_posts
- Get .subsubsub count of post per status queried using pre_get_posts
- Remove posts inside pre_get_posts using a custom query
- Filter pre_get_posts does not modify Mine/All/Pending
- Get Posts updated or published within the last x hours
- Run posts_where and posts_join only on the main query
- get_posts() interrupt because of filter
- pre_get_posts to hide everywhere posts from “Archive” category
- Custom SQL query slows down when using multiple OR … LIKE … in posts_where filter
- Apply pre_get_posts filter in a certain moment (just for a particular block of posts)
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- Testing requested query in pre_get_posts
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- Changing JPEG compression depending on image size
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- How to add taxonomy filter on the query fly?
- What do add_filters() and apply_filter() do?
- add_filter to youtube embeds?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Filter keywords from search query
- Add class to woocommerce checkout body based on filter [closed]
- Add classname to the_category() function?
- Filter the URL of next_posts_link & previous_posts_link
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- How To Get User Data in Callback Function for pre_user_nicename?
- What’s the best way to split admin-only functionality in the theme’s functions.php file?
- Editing
- the_content filter – checking the post
- add_filter to apply_filters that exists within class
- Which built-in WordPress files are safe to edit?
- How do I target a single page to modify the comment form of only that page?
- Adding a title prefix with the the_title filter
- How to removes all instances of thumbnails displayed in my theme?
- Contact Form 7 filter similar to preprocess_comment [closed]
- How to modify an existing meta description?
- Adding TinyMCE buttons without removing plugin buttons?
- Filter on the_content doesn’t update the content being searched via register_rest_route
- Where to add_filter in theme functions.php?
- Applying posts_clauses filter to specific queries only
- tag removed not using a filter
- How to customize the “Insert/edit link” popup box?
- How to filter backend post list showing only posts having a shortcode
- How do I override the_excerpt so that it will display full content?
- Why does WordPress strip custom HTML that are form elements and theme SVG icons?
- Get current user data
- How can you wrap add_filter with a if is_home() statement?
- How to add attributes to WordPress Admin Sub Menu List Items
- How do I hook my function to run only after submitting login form
- How to combine multiple body classes
- How to write a filter to remove a form field (WordPress) [closed]
- Why doesn’t this function work when I know that the IP Address is “true”?
- why require – does not load filter
- term_link filter rewrite link only applying half of condition?
- How to change dynamically page title according to variable data?
- Map plugin with proximity search compatible with Buddypress
- Create a pre-filtered version of the Media Library
- What is the action hook to use if you want to capture the new password during password change?
- Get_template_part inside filter?
- How to filter Sidebar Content
- Removing URL and adding container around image in the featured image metabox
- How would I use a filter to remove header banner on certain post types
- Replace Data In Post & Update Meta Field Post Is Saved
- How to add custom media library mime icons?
- Customising the default wordpress search functionality
- get_post() with filters applied
- Ajax filter – show all results that contain at least one filter
- WP_Query filter by custom meta
- How to add a blog filter bar without paying money. (example inside)
- Override admin selected page layout
- WordPress: Issue with filtering users using date range
- Does anybody know what the $current_screen ->id for customizer.php is?
- How to filter reading/visibility posts based on role?
- Apply pre_get_posts to specific custom post type in the admin area
- Filter and validate user role in registration
- wordpress filtering out caps in wp_title? (UpperCase is changed to Uppercase)
- String Replace Caching & Chance of Collisions
- is_page_template() doesn’t work with excerpt_length filter
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- Adding an orderby filter, casting postmeta with multiple keys
- confusion with add_filter
- post->post_content filter
- Which action/filter can i use for a Member Plugin [closed]
- How to change this WP logo and posts url in block editor?
- Limit total tags in the_content