How to add a “out of stock” badge in Woocommerce using AVADA (SOLVED)

You can easily add an “out of stock” badge in Woocommerce by just using CSS:

.outofstock .images a, .products .outofstock a {position:relative;display:block;}
.products .outofstock .fusion-image-wrapper a:before {
    height: 100%;
    position: absolute;
    width: 100%;
    display: inherit !important;
    content: "Agotado \A Disponible por encargo"; // customize this message
    white-space: pre;
    font-size: 0.8em;
    letter-spacing:2px;
    font-weight:bold;
    background: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    position: absolute;
    width: 100%;
    text-align: center;
    display: block;
    opacity: 0.7;
    line-height: normal;
    top: 0%;
    padding-top:40%;
    color:white;
}

This is how it looks like in my WordPress install (using Avada theme):

WOOCOMMERCE out of stock avada theme

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation