Add this code to functions.php. You can then use the shortcode [search_form], or whatever you choose to name it, in a menu. I used it in the navigation label field of a custom link.
function search_form_shortcode() {
return get_product_search_form(false);
}
add_shortcode('search_form', 'search_form_shortcode');
Related Posts:
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- Search results don’t show products
- Shortcode with product catgory counter
- wc_get_product in a none woocommerce page
- How to search Woo Commerce products with punctuation in title?
- WooCommerce Multi-Currency shortcode not working
- Woocommerce wp-admin search products through custom meta value too
- if statement for search results
- shortcode to display woocommerce cart total
- Separeting product from post in search result
- Products Shortcode is Displaying Single Product Page Price for all Products [closed]
- How can I custom order the product display?
- Woocommerce custom search
- Woocommerce Shortcode custom orderby not working
- 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
- Override static method in WC_Shortcodes class (shortcode) [closed]
- Unable to pull in custom product attribute in shortcode [closed]
- Adding author option to [products] woocommerce shortcode
- Pass class to Woocommerce shortcode [relative_products] [closed]
- Can’t find a product by SKU
- Absolute search against wordpress api
- How can i access woocommerce order variables inside shortcode?
- override the default WooCommerce products search form
- porto theme pagination on woocommerce not working
- 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?
- How to filter result set in custom metaboxes?
- I want to show always 4 category boxes everytime in woocommerce
- Woocommerce: Search by custom attribute
- How to use products shortcode in taxonomy-product_cat with multiple columns?
- Why isn’t working WooCommerce session inside shortcode?
- Notice: Trying to get property of non-object in
- Shortcodes in billing fields doesn’t work
- How can I change my search form to bring up product results, not blog results
- woocommerce Shortcodes – Change display between mobile and Desktop
- How to check which shortcode is using my template?
- If YITH Wishlist page is set to the WooCommerce my-account endpoint, the endpoints stop working all together. Any solution?
- Is it possible to hide certain products from displaying in the search results
- Creating a shortcode with a variable (Woocommerce)?
- Trying to insert a div ID link into Woocommerce shortcode Pagination
- Woocommerce ajax search can’t work on mobile
- how should i get products based on tags in woocommerce
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- ( Woocommerce) How to get the user belonging to an order? [closed]
- Get the product list of a given Category ID
- List of JS events in the WooCommerce frontend
- get woocommerce My account page link
- WooCommerce: How to edit the get_price_html
- Get woocommerce product price by id [closed]
- Product categories don’t appear as option to build menu
- WooCommerce Variable Product Price not showing on single product page
- How to override WooCommerce template files?
- Woocommerce add extra field to variation product
- Getting the gallery images from products in woocommerce?
- How to get current product category ID in product archive page
- Get url of product’s images (woocommerce)
- WooCommerce prices location in DB
- Order by rating not works in wp_query
- Woocommerce: How to remove page-title at the home/shop page but not category pages
- Woocommerce show cross sells on singe product page [closed]
- How to add a new endpoint in woocommerce
- Creating Multiple wp_localize_script for Shortcode?
- Are there any hook or filter when refund is done through admin -woocommerce
- How to check if is in cart page? [closed]
- Display single product attribute value on Shop page (Woocommerce)
- WP/WooCommerce REST API cart/checkout/order [closed]
- how to use wc_create_order with subscription product
- WooCommerce: Webhook disabled on its own
- Share users and WooCommerce memberships between two installations
- Slow Loading Attribute Select – WooCommerce Backend
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to change or add Woocommerce thank you page URL key content?
- How to remove an action within a class with extends
- single-product.php template not working for single products [closed]
- Insert variations via woocommerce api [closed]
- WooCommerce get physical store address
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- Correct function to get the user’s latest Woocommerce Subscription?
- Move payment options at checkout in WooCommerce [closed]
- add_filter to modify woocommerce_cart_item_name hyperlink
- Where do the cart details are stored in database?
- How to display product price of the product in loop
- How to disable Woocommerce password recovery and use the default WordPress password reset page?
- Display order items names in WooCommerce admin orders list [closed]
- Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
- Add custom variable to cart content [closed]
- Get product details by url key in WordPress woocommerce
- Get product link
- WooCommerce – Hook after Loading Variation in Admin Edit page?
- How to delete woo commerce order pragmatically? [closed]
- Display sorting options dropdown when using WooCommerce product category shortcode