(customization) What file I have to modify to add a label on thumbnail of products?

Solved3 replies3 participantsUpdated by Tony Rodriguez

  • Avatar: Wikafy
    Wikafy
    Participant

    I would like to locate what file I have to modify for adding a customization of flags/label on thumbnails of products on a corner.

    I only need to locate the files involed or the location I need to use in xstore-child to implement that. Like adding label on that little red box I put on the img.

    Best regards, 😀

    Files is visible for topic creator and
    support staff only.

    3 Answers

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @Wikafy,

    You can add custom content by using hooks in the child-theme/functions.php file. For example:

    add_filter('etheme_product_grid_list_product_element_image', function($image, $product, $local_settings) {  
        $badge .= 'Text';  
        return $image . $badge;  
    }, 10, 3);

    You can find the list of available hooks and filters in the following post:
    https://www.8theme.com/topic/add-custom-content-after-product-title-on-archive-page/#post-470675

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: Wikafy
    Wikafy
    Participant

    Thanks for the support! My topic “(customization) What file I have to modify to add a label on thumbnail of products?” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear Wikafy,

    It’s great having you in our WordPress & WooCommerce community!

    Every insight you share helps us refine XStore and build tools that empower thousands of online store owners worldwide.

    Together, we grow stronger with every release.

    Topic closed.
    The 8Theme Team

The issue related to '‘(customization) What file I have to modify to add a label on thumbnail of products?’' has been successfully resolved, and the topic is now closed for further responses