Website Building » WooCommerce » How Do I Add a Sold Out Overlay to Product Images WooCommerce?

How Do I Add a Sold Out Overlay to Product Images WooCommerce?

Last updated on October 1, 2022 @ 5:02 pm

If you want to add a sold out overlay to your product images in WooCommerce, there are two easy ways to do it. First, you can use a plugin like WooCommerce Sold Out Products, which will automatically add the overlay to your images.

Or, you can manually add the overlay using CSS.

If you choose to use a plugin, simply install and activate the plugin, and then go to the plugin settings page to configure it. You can choose which image sizes to apply the overlay to, and whether to use a dark or light overlay.

PRO TIP: If you are using WooCommerce to sell products on your WordPress site, you may have noticed that there is no built-in way to add a “sold out” overlay to your product images. This can be a problem if you have products that sell out often, as customers may not be able to tell at a glance which products are available and which are not.

There are a few plugins that will allow you to add a sold out overlay to your WooCommerce product images, but be warned: not all of them work well. In particular, we’ve found that the plugin “WooCommerce Sold Out Images” often breaks the layout of our product pages, so we don’t recommend it.

If you’re looking for a reliable plugin to add sold out overlays to your WooCommerce product images, we recommend “WooCommerce Image Overlay.” This plugin is lightweight and easy to use, and it won’t break your layout.

If you prefer to add the overlay manually using CSS, you can do so by adding the following code to your theme’s stylesheet:

.sold-out-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); // Change this to whatever color you want
}

Be sure to replace “rgba(0, 0, 0, 0.5)” with your desired color code.

Conclusion: There are two easy ways to add a sold out overlay to product images in WooCommerce – by using a plugin or by manually adding CSS code.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.