This doesn’t look like it would produce meaningful SQL, keys cannot hold different values at the same time (that’s why JOINs are usually required in complex queries).
Also using $_GET
global in queries is horribly insecure, if you have this anywhere near live site you should remove it immediately.
You earlier question used WP_Query
, if it did work at all (even if slowly) you should start with studying SQL it produced and optimize from that point.
Related Posts:
- Used with meta_query in query_posts works slowly
- Media library – Limit images to custom post type
- post_type_link filter causes 404 on the CPT page it’s used on
- WooCommerce product search titles only
- Setting proper query for multiple custom admin filters
- filter custom post type by meta key in dashboard
- How to filter wp_list_categories output with some custom post type meta query?
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- search suggest – filter post type
- Insert custom taxonomy into category query
- Enable shortcodes on custom post type
- Simple Share Buttons Add Plugin and Custom Post Type
- How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?
- Is there any filter to add a custom attribute to the tag in admin panel?
- Filter result of Custom Post Type using meta_query with ACF
- build child and anchestor three from post parent
- Display category filters for custom post type when category is shared by multiple post types
- Store a value in global scope after init hook is fired
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Query posts by current ACF meta key value on single page as related posts
- Filter in Custom post type to find the parent post
- meta query condition don’t work
- Custom query result empty on page 2
- Meta query and compare “!=” not working as expected
- meta_query Where the key value is stored as an array
- Orderby if between two meta fields
- How to select meta key in custom database query
- Dynamic page for nav items used as filters
- Create Post Types from a XML url (Real Estate website)
- Use WP_query to match post types based on custom field values
- Filter posts by their related field’s custom field
- Post Click Redirect to Custom URL instead of Single Post Page
- Show posts from WP Custom Post Type selected from a field in a metabox
- custom post type single page not found after aotumatic publish By the author’s robot
- Accessing download link from the loop with WP Download Manager Pro
- Set a template on a custom post in the plugin
- Simple way to hide\show an announcement (just a div) on homepage?
- Custom Post Type works when registered in functions.php but not when registered in plugin
- How can I add image sizes for a specific custom post type?
- Reading Custom Post data so I can have user update Manually
- ACF meta_key and meta_value break loop
- Why is this function so slow?
- meta query multiple values for the same key
- Permalink URL connection between two custom types
- How to show link to product in custom fields?
- Sort custom post archives by a meta value from a different custom post type?
- Taxonomy counter on Taxonomy List(plugin)
- Is it possible to arrange Custom Post Types from CPTUI into a Folder?
- Restrict Custom Post Type to One Item
- Custom Post Type Front Page Gives 404
- Multiple useres editing specified content
- Show Post columns to specific users on condition
- Add content to wordpress edit.php page
- Filter Custom Post Type Posts by Taxonomy
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Add input radio menu to post
- Custom post types – meta_query: search lesson which starts sooner
- add_rewrite_tag broke permalinks that doesn’t use that specific tag
- Disable ‘Add New’ in custom post that is made from CPT UI
- pricefilter without WooCommerce
- Output all terms slugs for a loop filter
- post type => ‘any’ not applied my custom queries
- Custom Post Type single post type shown in theme single.php
- CPT UI: Connect a custom post type to a custom post type
- filter rest api post by a acf filed
- Group Custom Posts Types in a Relation field of ACF
- Help Adding filter to Add Media button for custom post type
- Simple Data picker meta box
- How to check if a new private custom post type is created?
- How to get the posts that my following users are liked?
- Meta_Query refuses to return results
- Looping through image object using ACF and CPT UI [SOLVED]
- Sort loop by custom field from different post type
- Default custom post type url
- Run query on specific admin options page and send results to select field in another function
- Meta_query by date for Events archive
- Link two different post using there post_id in post meta
- 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 it’s possible to show from a post of a custom post type the taxonomy/terms?
- Custom post type that lets users create a set of posts?
- Include images from pages in wp search.php results in default wp search
- Keep br tags from stripping
- Meta query broken since 4.7.4 Update
- Create Inclusions and exclusions
- How to create groups like that in buddypress?
- Post that populates itself (almost) automatically using data from imported excel file
- I broke it! Custom post type archive gets redirected to home
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Custom Fields through plugin in a Custom Post Type
- Add filter button to custom post type in admin area
- Can’t save custom post type fields
- Filter between Custom Posts depending on meta_value
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- How to shows CPT which has specific meta key?
- How to Create movie schedule by custom post type query
- Best Plugins for Complex Index of Resources [closed]
- Querying, storing, and using data from 2 separate custom post types
- Query events post type after current date and timezone
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?