I had the same question a couple of weeks ago. Here’s what I did to make it work for me.
How Do I Use WP_Query to Run This Database Query as Search Result?
If you’ll read through my answer that I posted for reference’s sake, you’ll see that I ended up adding a filter add_filter('post_request','your_function_name');
which basically allowed me to completely rewrite the mysql query that was returning results from the database based off of additional parameters that I was passing through the query string in the URL.
Related Posts:
- Advanced search form with filters for custom taxonomies and custom fields
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Get Custom Field Values by Another Custom Field in WordPress
- Retrieve value of a category’s custom field
- search also in taxonomy, tags and custom fields
- Custom Taxonomy Search result page
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- ACF – Retrieve custom taxonomy from a relationship field
- Display Custom Field or Custom Taxonomy in front page /post/product
- Advanced search form with multiple custom fields
- Advanced search form with filters for custom taxonomies and custom fields
- Custom Sort Order for Custom Post Type Taxonomy
- How to Add Custom Fields to a Custom Post Type?
- Search multiple custom fields by using meta_query
- How do I Paginate Search Results for Custom Post Types?
- Search that will look in custom field, post title and post content
- clients list using wordpress
- Custom Taxonomy Template Post List with Sort Order
- How to replicate some of Drupal Views functionality in WordPress?
- Exclude from search all custom posts which are NOT in a taxonomy term
- Exclude a term of a taxonomy with a custom post type in a search
- How to do a custom bookmarks post type?
- How to sort a table of custom posts by column containing custom field
- Backend search; include CPT meta?
- Use Custom Post Type as Custom Field
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- get terms that have post with custom post type between 2 values
- Custom post type / custom fields
- Linking three taxonomies with ACF
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Custom Posts Hierarchy? (State/City/Restaurant)
- Automatically populate a hierarchical taxonomy from a custom field
- CPT Search Form with Taxonomy filter & Or
- Keyword search limited to specific post type filtered by multiple custom taxonomies?
- wp_query to find posts by year and month
- Including Custom Meta with posts_where query
- get_posts of Custom Post Type AND Custom Taxonomy
- How can I dynamically add a post to a custom post type which uses a custom field?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- WordPress sort search results by custom order
- Show custom post type relationships by taxonomy
- ACF From & To Date Validations
- Pretty URL for custom search for custom post type
- Hierarchy and access control for Custom Post Types (CPT)
- First custom field value (out of several) displayed twice after query
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Multiple Frontend Filters Using Advanced Custom Fields
- Searching Custom Fields
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- Creating custom post type with custom taxonomy and custom fields programatically
- Add custom attributes to a post
- How to inherit field value from parent post into in child / sub post
- how to get this tax_query working?
- How to get_term_meta on single custom post?
- posttype and custom fields on multisite
- How to fetch custom post types with its full data on wordpress?
- Ideas on how to organize a project [closed]
- Get custom term meta problem on single post type
- Group by custom field value (start and end times)
- Filtering custom posts by custom fields (ACF) [closed]
- Search CPT Title AND Meta
- Order custom posts by taxonomy, then by meta_key
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Writing a custom Glossary plugin
- add_filter get array data before display in custom post_type
- How to Implement Search Functionality?
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Custom front-end form for adding post – Category problem
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- Display Posts that fit a certain criteria on Category pages
- WP_Query not using custom taxonomy categories on custom post type
- Filter posts by their related field’s custom field
- wp_insert_post deleting previous post custom meta
- If ACF Post Object post has custom taxonomy term…
- I want to create a metabox under custom taxonomy
- Taxonomy shows up twice on Custom Post Type
- Query posts by multiple custom fields
- Create Inclusions and exclusions
- Automatically convert standard posts with custom fields to custom post types
- Best way to use Category & Custom Fields?
- Get month and day from a Date Picker custom field
- Search form to find custom meta box generated data
- How to query posts by meta keys AND under specific category?
- predefined custom field on registration page
- Show Custom Post Type taxonomy term that matches custom field
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Is it good practice to search for custom posts based on custom field values?
- Storing/querying custom date data
- Order by custom field attribute
- Advanced Custom Fields: query posts filtered by multiple field values
- Custom post type and custom taxonomy archive inaccessible
- Archive custom template from search
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes