Show Product Tags under Product in Shop Page

This topic has 6 replies, 2 voices, and was last updated 4 years ago ago by Olga Barlow

  • Avatar: Flea
    Flea
    Participant
    November 24, 2020 at 18:07

    Is there a way I can show my product tags under the title of the product in the /shop page?

    5 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 24, 2020 at 20:24

    Hello,

    There is no such option in our theme. You can implement this by additional customization. You can submit additional customization request here.

    Regards

    Avatar: Flea
    Flea
    Participant
    November 24, 2020 at 21:15

    Is there a way to do it with non-variable attributes, then?

    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

    Avatar: Flea
    Flea
    Participant
    November 25, 2020 at 01:14

    Great, thank you. Is there a way to do this for attributes?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 25, 2020 at 08:10

    Hello,

    Also only by additional customisation. Submit request to customisation team.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

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