Home Forums WoodMart support forum Custom Stock Badge Integration with WoodMart Labels

Custom Stock Badge Integration with WoodMart Labels

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #705559

    la.xtemos.acc
    Participant

    Hello!

    I need to add a stock status badge (“In stock”, “On backorder”, “Out of stock”) to:

    product thumbnails in the shop loop

    the single product gallery

    I want the badge to appear inside the same .product-labels container that WoodMart uses for “New”, “Sale”, “Hot”, etc.

    If WoodMart already prints a label → my badge should appear below it.
    If there are no labels → my badge should appear alone inside one .product-labels block.

    Right now, adding a badge via functions.php creates a second .product-labels container, because WoodMart outputs its labels directly inside template files.

    Is there an official hook or filter that allows me to append custom labels to the existing WoodMart label container in both the shop loop and the product page gallery?

    Thank you!

    #705623

    Artem Temos
    Keymaster
    Xtemos team

    Hi there,

    There isn’t an official hook or filter in WoodMart to append custom content into the existing .product-labels container in the shop loop or the single product gallery. The theme renders those labels directly in its templates, so adding a stock status badge inside that same container would require custom template modifications in a child theme, which is outside our support scope and we don’t have code to share for this.

    If you only need additional labels (not stock status), WoodMart supports custom product labels via attributes:
    – Create an attribute in Products > Attributes, add terms.
    – Edit the attribute and enable “Show attribute label on products”.
    – Assign the attribute/term to your products.
    These will appear inside the .product-labels container automatically.

    For a stock status badge specifically inside that container, please consider hiring a developer to implement a custom solution.

    Kind Regards

    #705661

    la.xtemos.acc
    Participant

    Hi!

    Thank you for your reply

    This might be quite useful feature in general (meaning for everybody). As showing InStock status is rather some basic things for certain products. Specifically, when the product is out of stock and showing a badge is very useful.

    We have implemented it using custom javascript and css code, and it works. But the standard tools could have been helpful too.

    #705754

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Thank you for the feedback. We will consider this as a feature request for our future updates.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)