Oh ok, then this code won’t work because what this does is to display a banner image in the product Category page, as in website-url/product-category/computers, is different to what you want to do.
In this case, I’d use a plugin to add custom badges, I’ve used this one and it works ok.