There are many snippets on the internet but many are out of date… so this is how to completely hide the Shop Page title in WooCommerce (plus: how to hide the title on WooCommerce Category pages). Enjoy!Continue reading WooCommerce: Remove “Shop” Title @ WooCommerce Shop Page
By default, empty WooCommerce product categories (i.e. categories which have no published products) will not display on your Shop page.
This makes a lot of sense and avoids that customers land on empty pages… BUT sometimes you might have different needs and require that users still see these categories when the shop display is set to “Show Categories”.
Thankfully there is a quick one-line fix that you can copy / paste in your functions.php to show empty categories… enjoy!Continue reading WooCommerce: Show Empty Product Categories
When your WooCommerce store has no published products the shop page will not display anything. A message “No products were found matching your selection” will show instead. The same applies to empty categories.
So, how do we hide this notice? Thankfully, and once again, one line of PHP is sufficient to achieve the result! Enjoy 🙂 Continue reading WooCommerce: Hide “No products were found matching your selection”
We already have a nice “SALE” badge by default with WooCommerce (as well as the “OUT OF STOCK”) one. These show on the shop page once certain conditions are met.
Now, what if we wanted to show a “NEW” badge for products added in the last 30 days? This would certainly grab the customer attention, and also communicate the fact your shop is constantly updating with new products and content (well, good for Google too, right?).
So, how do they do it? (Sounds like one of those Discovery Channel shows…)
Well, here’s a simple snippet for you; simply copy/paste into your functions.php and magically a “NEW” badge will show (note: CSS is not provided, you’ll need to adjust it based on your current theme and custom styles). Continue reading WooCommerce: Display “NEW” Badge on Recent Products
A BloomerArmada fan asked me a very interesting question: how can I link each product in the shop page to its own custom landing page as opposed to the default permalink?
Of course this applies when you don’t want to use the default single product page for all or some products. Clearly, you could set up a 301 redirect from the single product page to the landing page – that will help for SEO as well. But if this is temporary, or you need to still give access to the single product page later on, then a redirect is no good.
So, here’s how you can override the default permalink. Continue reading WooCommerce: Change Product Permalinks @ Shop / Loop Pages
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
You would know by now ecommerce customers buy products for different reasons. Your store products might be cheaper than your competitors, maybe you offer better shipping rates, possibly you restock products more quickly than anyone else – or simply you’ve got a great product people keep buying.
One way to display your product features and benefits on the Shop page is by using “product badges”, a series of display messages that are able to communicate with the user immediately.
You’re probably already familiar with the “SALE!” badge that WooCommerce gives us by default. What if you wanted to show the exact percentage amount of that offer?
You’re also aware of the “Featured” option for WooCommerce products. Yes, they show in the “Featured” product shortcode, but what if you wanted the shop to display these special products in a different way, i.e. by using a special badge?
Well, there are millions of examples on how you could improve your products page (and single product page) by making the most of product badges. Thankfully there are snippets and plugins that can help you with that.
A little investment might mean better click-through rates and therefore higher conversion rates! Continue reading WooCommerce: How to Display Custom Product Badges (e.g. %OFF, NEW, FREE)?
We’ve seen in the past how to completely remove the “Default Sorting” dropdown that shows in the WooCommerce Shop, Category and Product Archive pages.
Sometimes, however, you might just need to remove one of the default options, rename a sorting option accordingly to your needs or even add a brand new sorting method. As usual, a few lines of PHP are sufficient to achieve anything, thanks to WooCommerce hooks and filters. Continue reading WooCommerce: Remove, Rename, Add “Sorting” Options @ Shop
A client of mine had to style a WooCommerce product category page but ONLY if it was a subcategory. So I decided to add a “subcategory” class to the HTML body, so that they could target this in their custom CSS.
As usual, the PHP is quite easy: I check if the current page is a product category, then if the category has “parents” and only in this case add a body class. Pretty easy! Continue reading WooCommerce: Detect if Current Category Page is a Subcategory
This week’s snippet is about one of the most popular WooCommerce plugins on the WordPress repository: YITH WooCommerce Wishlist developed by YITHEMES.
With over 500,000+ active installations, you can probably understand why this is extremely on demand. Having a “wishlist” on your WooCommerce website is a great idea: customers can save their desired products and get back later to complete the purchase.
One of the most requested customizations of such plugin is to display the wishlist buttons on the shop (also called product archive or product loop) pages, under each product’s add to cart button. And the fix is extremely simple! Continue reading WooCommerce: Display YITH Wishlist Buttons @ Shop Page
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
Another interestng snippet that could come very handy. How do we show product dimensions on the shop / category / tag / loop pages? Continue reading WooCommerce: Display Product Height, Length, Width @ Shop Page
A WooCommerce client, for different reasons, needed to detect if a given logged in user had already purchased a certain product ID. In your case, you can use this little “trick” for marketing (i.e. “Buy More of This!”) or to show special notices on the loop or single product page. Continue reading WooCommerce: Check if User Has Already Purchased Product
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
A client of mine has a category called “Brand”. Each product is assigned to a specific Brand subcategory e.g. Nike, Adidas, etc. The goal of this task was to show the “Brand” subcategories in the shop/category/loop pages as a way to help the user identify the brand name. Continue reading WooCommerce: Show Product Subcategories @ Shop Page
A client asked me to show a given custom field in the loop (i.e. Shop page, Category pages, Tag pages = anywhere woocommerce products are returned). Interestingly enough, she didn’t want to show the product short description (see “show product short description on the homepage only” snippet) but a custom field, so here’s how you do it! Continue reading WooCommerce: Show Product Custom Field in the Category Pages
Here’s yet another WooCommerce simple PHP snippet if you wish to completely remove / hide the SALE! badges on the homepage, shop page, category pages and single product pages. Once again, wit a few lines of code you can achieve anything you want! Continue reading WooCommerce: Remove SALE! Badge Everywhere
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
A client wanted to show only featured products on the shop page. While adding featured products is very easy (just use the WooCommerce shortcode in the page content), it seems very difficult to remove the “other” products. Here’s what I did.Continue reading WooCommerce: Hide Products @ Shop Page
Mostly when working with external products in WooCommerce, you may want to not only rename “Add to Cart” into something else… but also opening the link into a new tab. Here’s how I did it!Continue reading WooCommerce: Add to Cart URL to Open in a New Browser Tab