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
- wp_query check if integer exists in custom field’s array
- How can I dynamically add a post to a custom post type which uses a custom field?
- Search Custom Post Type & Taxonomies
- How to stick custom post at the top in search results
- Filter custom posts using auto populated dropdown selectors
- 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?
- Bulk Update Custom Fields for Custom Post Types
- WordPress sort search results by custom order
- WP_Query order by custom field, then randomly order some of results
- Show custom post type relationships by taxonomy
- Query custom post type with ACF Date
- Meta Query Not Returning Output Despite Having Matching Values
- Including metaboxes from custom post types in global search — continued
- ACF From & To Date Validations
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Dynamic dropdown select values depending on other custom field value
- How to render a custom post type template with custom fields using shortcode
- Pretty URL for custom search for custom post type
- Order Custom Post Type by Custom Field Value
- Query Custom Post Type Taxonomy term with multiple parameters
- Hierarchy and access control for Custom Post Types (CPT)
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Auto Complete Search
- 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)
- Search Tool only refreshes Page without showing results
- How to group posts and get a mixed posts and groups view?
- Multiple Frontend Filters Using Advanced Custom Fields
- Integrate Custom Post Type Events into Calendar
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Displaying custom field according to date
- Displaying and searching Custom Posts
- Search by tag name and category
- Searching Custom Fields
- Advanced search form with filters for custom taxonomies
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- Show fields based on taxonomy selection in editor
- filter search custom field query
- Permalinks: custom structure for taxonomy – tags?
- How to let users choose where to search for posts?
- Include custom taxonomy term in search
- WebP Fallback for Inline Background Image in Style Attribute
- Query based on custom fields start and end date
- Custom post type’s extra fields – how to handle?
- How to get a custom type post data when it has a connection with another custom type post?
- Creating custom post type with custom taxonomy and custom fields programatically
- List of users that clicked a ‘Join’ button at single post
- Targeting categories in custom fields
- Add custom attributes to a post
- Custom taxonomies to define versions of a product
- How to inherit field value from parent post into in child / sub post
- how to get this tax_query working?
- Custome fields not displayed
- search custom post type by custom fields on front end
- How to get_term_meta on single custom post?
- Many to many to many custom post relationships
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- How to define the template for custom posts?
- Custom Search | check multiple meta_value for search value
- Hide custom post type from search based on custom taxonomy
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Sum and count of custom field values
- How to fetch custom post types with its full data on wordpress?
- Reusable metabox backend and frontend
- Ideas on how to organize a project [closed]
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Get custom term meta problem on single post type
- Custom post type name and assigning custom taxonomy
- Group by custom field value (start and end times)
- Custom post types, disable fields
- Best way to create a search for custom post type by custom field values
- Filtering custom posts by custom fields (ACF) [closed]
- Building a Portfolio and need some direction
- Custom post types category
- Multi Parameter search with custom post type category and tag
- Limit search field to just search a custom post type with custom fields
- Custom Taxonomy dont save in a frontend form for post a custom post
- Search CPT Title AND Meta
- Excerpt length: get first paragraph
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Should i use custom post type for a custom footer?
- Order custom posts by taxonomy, then by meta_key
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?