Reply 261098 to: Show Product Tags under Product in Shop Page

Avatar: Olga Barlow
Olga Barlow
Support staff
November 24, 2020 at 22:26

Hello,

Add the below code to child theme functions.php to display tags

add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_product_loop_tags', 5 );

function woocommerce_product_loop_tags() {
    global $post, $product;

    $tag_count = sizeof( get_the_terms( $post->ID, 'product_tag' ) );

    echo $product->get_tags( ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '.</span>' );
}

Regards

Go To The Whole Conversation In Topic

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.