I want to display regular_price product after sale_price product. For example product #5 is not sale_price, i want it to be after product #6. Product with sale_price will come before regular_price products.
I want to display regular_price product after sale_price product. For example product #5 is not sale_price, i want it to be after product #6. Product with sale_price will come before regular_price products.
2
Answers
I’m not sure this code works properly, but this way you can display specialty or auction products at the top of the screen.
I think you are looking something like this https://wordpress.stackexchange.com/questions/287483/sorting-products-by-price-regular-sale-price
Even you can get idea from that
Show Out of stock products at the end in Woocommerce
Note: WooCommerce has extension for that https://woocommerce.com/document/sale-product-first-for-woocommerce/