Yes, you can add search value in getting post query like this :
$args = array(
'post_type' => 'product',
's' => 'search value',
'meta_query' => array(
'relation' => 'OR',
array( // Simple products type
'key' => '_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
),
array( // Variable products type
'key' => '_min_variation_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
)
)
);
query_posts( $args );
Related Posts:
- Search results don’t show products
- How to search Woo Commerce products with punctuation in title?
- Woocommerce wp-admin search products through custom meta value too
- 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
- 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?
- Woocommerce: Search by custom attribute
- Notice: Trying to get property of non-object in
- How can I change my search form to bring up product results, not blog results
- Is it possible to hide certain products from displaying in the search results
- Woocommerce ajax search can’t work on mobile
- how to use wc_create_order with subscription product
- Add custom variable to cart content [closed]
- WooCommerce changes lost password reset link
- Woocommerce My Account Endpoint – how to get ID parameter from URL?
- Default woocommerce placeholder image
- How to add Woocomrce cart page shipping calculator to my country state list
- Custom Woocommerce image size [closed]
- Migrate WooCommerce Orders [closed]
- WooCommerce Subscriptions: Show monthly Price for annual Product
- How to add multiple product gallery images from front-end
- Disabling the free shipping method when the cart has product/s which assigned a certain shipping class [closed]
- woocommerce_email_subject_customer_completed_order
- is_shop, is_home, is_front_page doesn’t work for woocommerce
- Woocommerce – Show random product thumbnail from specific product category
- How to add a greeting message upon logging into WordPress for certain user role
- Modify some CSS with functions if (function_exists
- Limit total quantity of products in WooCommerce group product
- WordPress keeps moving my widgets to other widget areas
- Woo-commerce Checkout Summarized in Pop-up Card Entry Only
- How do I add an extra field to comment form above the submit button?
- woocommerce email template detect email recipient
- WooCommerce – buying as well as selling
- WordPress and WooCommerce – How many products are too many? [closed]
- How to get woocommerce selected variation from order object
- JWT on Woocommerce cannot work with “Customer” role user
- Woocommerce – Add HTML around Product description [closed]
- relocate woocommerce notices/messages on Cart page
- Woocommerce emails from gmail not being sent
- lost password link not working for my site
- How to give each category name its own ACF background color?
- WooCommerce 4: Gallery size is too large in mobile
- Redirect Search to Form When No Product Results Are Found
- WooCommerce event works in jQuery but not in JavaScript
- Filter default_content only for products
- Remove Visual Editor and P tags from WooCommerce Taxonomy Descriptions [closed]
- get_posts $args won’t accept array as one of the criteria?
- Blank search results on custom search
- Custom fields values not being created
- Adding additional text under the price via product page
- Display WooCommerce product category on shop page (on every product)
- Multisite login – registration is duplicated
- WooCommerce variable product can not add to cart using ajax after updating latest version of WooCommerce
- Restrict product tags archive to certain users
- Logo showing on some page but not on product categories pages
- Woocommerce doesn’t work with theme, header missing and css messed up
- Woocommerce Product Variation – Add Price Logic
- Display related product categories by subcategory
- How to let users create lists of woocommerce products?
- Order again Woocommerce inside View Order
- Photo cover in WooCommerce
- How to vary WooCommerce product prices based on order dates
- How to save one API response to WooCommerce order meta data
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- Can’t update WooCommerce payment method title
- Set Post Thumbnail to external URL
- Custom theme woocommerce product detail page template not working
- Increase the download speed of a large number of variations in WooCommerce
- remove add to cart for free (0 $) product woocommerce
- WooCommerce related products load random posts per page
- WooCommerce: Adding a setup fee to certain products
- Removing shipping for one product with coupon
- Awesome Support Custom Field for show Woocommerce orders
- Site with WooCommerce section moved to HTTPS – all pages except home and main store are 404s
- Multiple quantities with options
- Adding more than one item to Woocommerce cart
- Woocommerce – get product in category with specific attribute
- Woocommerce make appear when items added to cart
- How to add a menu page for options in wordpress for user that has the role of vendor?
- Testimonials/Reviews for Products
- add custom menu in woocommerce dashboard [closed]
- Updating order meta to have a meta entry from an item in the order
- How to dublicate WC Product title to shortdescription field? [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- Woocommerce product and category in url [closed]
- Display product categories + child-categories on a single product page