Based on my subsequent review of wp-includes/query.php, what I was attempting is simply not possible. This is because the query vars may only be modified to predefined set of values. As best I can determine, you cannot arbitrarily modify queries.
Related Posts:
- Query to Exclude Child Pages from Custom Post Type Archive
- Prevent pre_get_posts filter on specific post type
- How to put custom post types on front page
- Custom Post Type, WP_Query and ‘orderby’
- Sorting a query by custom field date
- Number of pages – multiple (custom) post types
- Include post id[s] into WP_Query()
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Pre_get_posts Gives 404 on Custom Post Type
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Can’t sort order of wp_query with 2 meta keys
- Display all Posts and only certain Custom Post Types with meta fields
- Exclude the parent custom post-type posts only
- Sort by two dates. Default entry date and custom field if present
- Sorting multiple custom post types without a meta key/value pair by sort order
- Combining sorted and random CPT
- Advanced or not so advanced pre_get_posts query
- Wp_query: sort by PHP variable
- Crafting WP_Query array, sort by date
- WP_Query order by custom field, then randomly order some of results
- Sort entries by date mixing two post types
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- Sort results without WP_QUERY?
- Sorting the Loop by Taxonomy Value
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- Sort custom posts by date and then by taxonomy
- How to sort by multiple values in a nested WP_Query
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Wp Query sort order from custom MetaBox
- sorting in wp query based on custom field value
- pre_get_posts gives 404 error on Custom Post
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Sort CPT by taxonomy AND THEN by custom field
- Sorting by Title for Post Archive Categories for Custom Post Type
- Meta query with boolean true/false value
- Get Posts in a Custom Post Type category
- Search multiple custom fields by using meta_query
- category__in not working on custom post type
- How to sort a table of custom posts by column containing custom field
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Date query for a custom meta field
- Querying Posts by Taxonomy From Alternate Network Site
- Set default option in dropdown of WP_Query?
- Combine tax_query and meta_query in WP_Query
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Parent / Child formatting in a list of post of a custom post type
- Custom WP_Query not returning results when querying custom post type
- Using pre_get_posts to filter one loop in a multiloop archive
- WP_Query: include custom post type only with specific meta value
- showing custom post types of a certain category only
- Problem querying Custom post type by custom fields
- How to target a specific custom post type post and its all children and grandchildren?
- Query Multiple Custom Posts by Custom Fields
- Custom taxonomies relationship
- WP_Query orderby and tax_query
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Different Ways to Query Custom Post Types?
- can these 3 queries be re-written as 1 query?
- cannot override post_types in WP_Query()
- Wrapping x posts in html without leaving empty html
- Loop for custom post types filtered by a taxonomy
- Loop increase number
- Custom filter for main search: how to exclude specific post_type from search results
- Is This Code Efficient – Or is there a better way?
- how to show records that don’t have custom meta value
- how to get this tax_query working?
- Custom post type and custom taxonomy 404 on page 2
- Can’t change posts per page in WordPress Post Type Query
- Creating a Tabbed Widget
- Using WP meta query to show custom post types by a start and finish date
- Sort column on meta key and meta value
- How do I list a custom field and custom taxonomies for each result in a loop?
- Wp Meta Query does not work while simple Query Works
- set object terms after some some time of published post – functions.php
- Change search query in wordpress custom post type
- Display related CPT with custom taxonomy
- build child and anchestor three from post parent
- How select query is generated in a Custom Post Type?
- WP_query sort by taxonomy
- Post Query , breaks layout if a post is deleted
- Linking posts together with Advanced Custom Fields “both ways”
- Apply pre_get_posts to specific custom post type in the admin area
- Not able to get my custom search result using meta_query and tax_query together?
- How to sort custom post’s category by id from the theme’s function.php?
- WordPress query in which condition uses custom field
- How to get Current week and current date record wp query
- Error in WP Query. If variable is empty it is displaying previous post value
- Custom post type not being pulled in widget
- Query posts from multiple post types sorted by overarching menu order
- Custom Taxonomy Query by Taxonomny not working
- query and paginate multiple post types
- Query posts by a type and another type only if post is in specific category
- Custom Query With Multiple Meta Key Value
- Fallback if statement based on the number filtered from it
- Custom Post-type not returning the right child_of
- How do I hide single category post on my post page
- Get images only from a certain post type
- Display ACF object field data using Elementor Custom Query
- WordPress custom field sorting, weird behavior: the latest post is at the end
- Sort ACF by custom taxonomy