It depends. There are plugins that can add this functionality, I have used SearchWP in the past, it works well with WooCommerce.
You could also write your own custom function and add it to your theme’s functions.php file. Something like this should work.
function my_custom_search( $query ) {
if( ! is_admin() && $query->is_main_query() ) {
if ( $query->is_search() ) {
$meta_query = array(
'key' => 'custom_meta',
'value' => $query->query['s'],
'compare' => 'LIKE'
);
$query->set('meta_query', $meta_query);
}
}
}
add_action('pre_get_posts' , 'my_custom_search');
Related Posts:
- How to filter result set in custom metaboxes?
- Search results don’t show products
- How to search Woo Commerce products with punctuation in title?
- global $post; in WooCommerce
- if statement for search results
- Separeting product from post in search result
- Woocommerce custom search
- Change the Title Tag of Search Products Page
- WooCommerce orderby template disappears and not longer works on search page
- search customers in front end by billing data
- Create a shortcode for native WooCommerce search form [closed]
- Can’t find a product by SKU
- Absolute search against wordpress api
- override the default WooCommerce products search form
- Create a Search Form that only Searches with WooCommerce Sale Products
- Call product search from custom hook
- Search doesn’t return anything
- edit URL of search result
- No Results in WooCommerce Product Search
- Woocommerce Multisite global search how to mod ajax function?
- I wan redirect link post search to search product woocommerce?
- Woocommerce: Search by custom attribute
- How to save a Woocomerce metabox input as a metadata field
- Notice: Trying to get property of non-object in
- How can I change my search form to bring up product results, not blog results
- Woocommerce add a text field if specific option is selected
- How to hide metaboxes in WordPress Admin on WooCommerce “Add Product” page – Remove side sortables for a specific user role
- Is it possible to hide certain products from displaying in the search results
- Woocommerce ajax search can’t work on mobile
- I want to Display custom woocomerce meta box in orders list
- Images not showing on site – Even though they are there
- WooCommerce – Hide price and add to cart button
- How to know the page from which a product is added to the cart? – WooCommerce
- Enable Payment gateway if ACF checkbox in user profile is checked
- Tax exclusive if coupon applied else tax inclusive in items
- Send a different “thank you” email based on payment method
- How to add contact seller button in product page
- Delete product image using WooCommerce API?
- Empty Cart on just mobile and Microsoft edge browser
- WooCommerce Registration, Sync User, Billing and Shipping info
- Would it be ok if i had only 1 main woocommerce category?
- wc_mail in foreach loop is sending only the first email
- How to get product variation price in woocommerce_checkout_create_order_line_item hook
- Display product thumbnail in Woocommerce email notifications
- How to fix: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” after malware cleaning
- Select all products that have a custom field ‘is_new’ set to ‘Yes’
- Getting error in debug : price was called incorrectly. Product properties should not be accessed directly
- How do you reactive related products on WooCommerce when it has been disabled?
- Woocommerce rounding cart totals with tax up
- Display product variations in shop page
- Possible to have multiple Authorize.net accounts on the same site?
- Can’t update WooCommerce payment method title
- Woocommerce – Shop can’t find products after domain name change
- Set Post Thumbnail to external URL
- Allow HTML in product attributes for WooCommerce
- Woocommerce on Subdirectory
- woocommerce_sessions – Table does not exist
- Change WooCommerce state and city checkout fields to dropdowns related to the chosen country
- Show products as posts on archive page
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Custom theme woocommerce product detail page template not working
- Woocommerce new shop page
- How to apply a custom coupon to a WooCommerce Subscription recurring amount?
- Woocommerce: sorting variable product
- Add class to latest item Woocommerce
- Increase the download speed of a large number of variations in WooCommerce
- Use woocomerce shop filters on other pages
- How update price for variable product
- Remove filter parameter from Link URL
- WooCommerce product details page category display
- Woocommerce – Default product image by user role
- remove add to cart for free (0 $) product woocommerce
- Customer Email Address
- Product related to post by title
- WooCommerce product id as permalink
- WordPress/Woocommerce Classes and adding new properties
- currentURL is not defined
- How to send an automatic email to a custom field in Woocommerce order meta 2 weeks after a product is bought
- merge tabs in woocommerce
- How to echo woocomerce attributes values in dropdown box
- Customize categroy catalog page
- How do you programatically add a booking item to the cart?
- Create post when new woocommerce order is created [closed]
- Woocommerce cart table too wide [closed]
- Add new page in WooCommerce My Account page
- How to import products to Woo Commerce given that WP All Import keeps timing out
- Merge “description” and “additional informations” product tab
- Add to cart is not visible in product page
- Clickable product image with hover effect
- I need to refresh the checkout page if someone changes the zip code
- Adding a second button next to the shop button Woocommerc [closed]
- Updating WooCommerce product field when product author updates profile field
- French accented text replaced with ? in woocommerce product list
- Trying to figure out why an error is returned when trying to add an item to the basket on this website
- Conditionnaly replace “Read more” text WooCommerce products
- Correct method of reducing the number of images created by WP and Woo together
- WooCommerce/Authorize.net interface problem
- populating extra field with woocommerce categories
- WooCommerce subscriptions give option of manual renewal on checkout [closed]
- Woocommerce Shop Manager Capabilities