You have to modify WooCommerce search query.
- Hook into this action:
do_action( 'woocommerce_product_query', $query, $instance );
- Detect if it is a search query
- Add your
_subtitle
meta
Something like this (not tested):
if ( $query->is_search ) {
$query->set('meta_query', array(
array(
'key' => '_subtitle',
'value' => $query->query_vars['s'],
'compare' => 'LIKE'
)
));
};
Related Posts:
- Using meta query (‘meta_query’) with a search query (‘s’)
- Including custom fields in search?
- Add custom fields to search
- Custom search: by post data and post metadata?
- How to access custom order item meta data from a meta key in WooCommerce?
- Need small coding with Custom Fields Search
- Search ONLY by meta key / meta values
- Save Custom Fields for Variations Product
- Filter results with custom field values and dropdown
- Add custom field (value) to search result (without plugin)
- Is there a way to do multiple ordering on a multiple meta_query?
- searching in custom meta field
- Adding existing user custom field value to a woocommerce product [closed]
- WordPress Search Custom Meta Field Only
- Exclude custom post type from search by custom field value?
- Adding Custom Text Area to WooCommerce Product
- WooCommerce conditional required checkout fields [closed]
- Extend ‘The Events Calendar’ search to include custom fields [closed]
- Including Database Generated Pages in Site Search [closed]
- woocommerce product custom field
- Adding Custom Fields to Search
- How to get customfield value by woocommerce product ID
- sort search results by custom fields using dropdown
- Using a checklist to search against metadata
- How do I use wp_query for WordPress search?
- Custom Fields Not in Search Results
- Conditionally hide or show woocommerce product variation in fontend by custom field
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Bulk remove post meta
- How to create html block to display extra information on woocommerce single product page
- Display WP-Types custom fields in post [closed]
- How make a custom search on backend in WordPress without plugin?
- filtering custom post types via meta data drop down
- Advanced search by two criteria – sort by location and date (ascending or descending)
- Modifying custom order item meta from admin order view
- Extend product search with meta in WooCommerce
- How to create a dropdown select of all items in an ACF field group
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- How do I add an image upload, custom field to a WooCommerce product?
- Advanced search for meta fields
- WooCommerce – Adding Custom Fields To Invoice
- Woocommerce Product Custom Select List (not variation)
- jQuery – Automatic event trigger does not **really** check my form
- Merge Multiple Custom Fields into one New Custom Field for Searching
- How to populate custom field dropdown box based on prior selection?
- Search in Archive Pages by subcategory, tag, custom field and year
- Custom WP_Query for WordPress Search Results with meta_query
- filter custom field values $min $max
- Restrict WordPress Search to Custom Field
- How can you include custom post meta in search without calling each key?
- How to add new field to the account address?
- How to display custom field in woocommerce email orders? [closed]
- Woocommerce Retrieving custom field value from orders
- Include one custom field in search results
- Update custom field values on edit address page woocommerce
- Woocommerce frontend edit custom fields
- Custom search SQL Query to add custom field in result
- Search Results Page – Displaying Custom Meta Fields
- Custom field Search with Relavanssi
- How to exclude custom fields from search queries?
- How to show content of custom fields in search results?
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- Type character in name and make it invisble
- Search & column order by meta value in admin
- search based on custom field
- Is it possible to add Term Meta Fields to a WooCommerce Attribute?
- Very large list of options for BuddyPress profile fields
- Why does my numeric meta query work only on one meta key and not the other?
- Update custom field on the fly
- (woocommerce) How to get product id form order id & then retrieve custom meta linked to product?
- How to delete WooCommerce Products than have a specific custom field?
- searching by keywords in post’s metas or pagination links problem
- Search fails when using the radio buttons
- WooCommerce 3 get custom variation on process order [closed]
- How to save array option as text and not integer?
- Use a different catalog image than the featured image
- Admin – Search Events by a custom field
- Check if value exists before saving
- Search one custom field?
- Create custom query for search?
- Query postmeta values, and return multiple post_titles for common meta value
- Query Custom Fields in Searchform
- Help sorting by Meta Key value
- Custom search with meta fields
- Add Custom field under the post title [closed]
- woocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19% [closed]
- price calculation from custom field (woocommerce) [closed]
- Hiding custom fields when content is empty [closed]
- Cannot save values to custom fields for variations on Woocommerce 2.4.6
- Send checkout page custom field in order email
- Extract array from custom field
- Assign class to Drop Down Selections in WooCommerce Products Custom Fields
- How to display search query as formatted text?
- Search for meta_query does not return any result if combined with title
- Update posts after populating ACF field value [closed]
- WP Query – Is this correct?
- How to show ACF fields in Gridbuilder custom block
- jaredatch metaboxes on video post formats
- Extend search query to search meta keys values based on search string