Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WOOCOMMERCE TAGS
- // Tag in archive pages//
- add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_product_loop_tags', 5 );
- // Tag on singel productpage
- add_action( 'woocommerce_before_single_product_summary', '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>' );
- echo $product->get_tags( ', ', '<span class="tagged_as">' . _n( '', '', $tag_count, 'woocommerce' ) . ' ', '</span>' );
- }
Add Comment
Please, Sign In to add comment