We’ve already seen how to add a custom “Product Sorting” option to the “Default Sorting” dropdown in the Shop page.
The task I was presented with, however, was to display items based on a custom “meta key”. Now, if you have no idea what a “meta key” is, don’t worry too much. For example, “stock status” is one of these keys, and therefore you can sort products by that.
Anyway, let’s abandon the Japanese for now (hey, unless you speak Japanese!) and get into the coding – as usual, simply copy/paste this little plugin in your functions.php and you’ll get the wanted result 🙂 Continue reading WooCommerce: Show In Stock Products First @ Shop
A client of mine wanted to show out of stock products on a separate page – so I coded a simple shortcode for you all!
You can use this same shortcode for different goals. For example, you might want to display what products you’ve sold so far to enhance customer trust (which is the same as displaying those products that are not in stock). Or maybe, you might want to have a specific page where customers can go to see what’s coming back in stock (if you don’t sell unique pieces and restock your products).
Either way, let’s see how to (1) create a shortcode and (2) how to use a WordPress query to return just those products that have 0 stock! Continue reading WooCommerce: Display Out of Stock Products (Shortcode)
Thanks to the various requests I get from Business Bloomer fans, this week I’m going to show you a simple PHP snippet to echo the variations’ name and stock quantity on the shop, categories and loop pages. Continue reading WooCommerce: Display Variations’ Name & Stock @ Shop Page
In this tutorial, my goal is to show the “stock quantity” under each product in the shop, category and archive pages (wherever there is a loop). Enjoy, and feel free to leave a comment for any support request 🙂 Continue reading WooCommerce: Display Stock Quantity on Shop Page
Another simple snippet that can easily help user experience and make sure the sold out badge shows on every product in the category & shop page. Not all themes allow this so you can use the snippet below to make it happen! Continue reading WooCommerce: Show “Sold Out” on Archive/Product Page